class PHPUnit_Util_PHP_Windows

Windows utility for PHP sub-processes.

@package PHPUnit @subpackage Util @author Sebastian Bergmann <sebastian@phpunit.de> @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de> @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License @link http://www.phpunit.de/ @since Class available since Release 3.5.12

Hierarchy

Expanded class hierarchy of PHPUnit_Util_PHP_Windows

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/PHP/Windows.php, line 57

View source
class PHPUnit_Util_PHP_Windows extends PHPUnit_Util_PHP {

  /**
   * @var string
   */
  protected $tempFile;

  /**
   * @param resource $pipe
   * @since Method available since Release 3.5.12
   */
  protected function process($pipe, $job) {
    if (!($this->tempFile = tempnam(sys_get_temp_dir(), 'PHPUnit')) || file_put_contents($this->tempFile, $job) === FALSE) {
      throw new PHPUnit_Framework_Exception('Unable to write temporary files for process isolation.');
    }
    fwrite($pipe, "<?php require_once " . var_export($this->tempFile, TRUE) . "; ?>");
  }

  /**
   * @since Method available since Release 3.5.12
   */
  protected function cleanup() {
    unlink($this->tempFile);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHPUnit_Util_PHP::$phpBinary protected property
PHPUnit_Util_PHP::factory public static function @since Method available since Release 3.5.12
PHPUnit_Util_PHP::getException protected function Gets the thrown exception from a PHPUnit_Framework_TestFailure.
PHPUnit_Util_PHP::getPhpBinary protected function Returns the path to a PHP interpreter.
PHPUnit_Util_PHP::processChildResult protected function Processes the TestResult object from an isolated process.
PHPUnit_Util_PHP::runJob public function Runs a single job (PHP code) using a separate PHP process.
PHPUnit_Util_PHP_Windows::$tempFile protected property
PHPUnit_Util_PHP_Windows::cleanup protected function @since Method available since Release 3.5.12 Overrides PHPUnit_Util_PHP::cleanup
PHPUnit_Util_PHP_Windows::process protected function @since Method available since Release 3.5.12 Overrides PHPUnit_Util_PHP::process