You are here

class PhpProcessTest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/process/Tests/PhpProcessTest.php \Symfony\Component\Process\Tests\PhpProcessTest

Hierarchy

  • class \Symfony\Component\Process\Tests\PhpProcessTest extends \Symfony\Component\Process\Tests\PHPUnit_Framework_TestCase

Expanded class hierarchy of PhpProcessTest

File

vendor/symfony/process/Tests/PhpProcessTest.php, line 17

Namespace

Symfony\Component\Process\Tests
View source
class PhpProcessTest extends \PHPUnit_Framework_TestCase {
  public function testNonBlockingWorks() {
    $expected = 'hello world!';
    $process = new PhpProcess(<<<PHP
<?php echo '{<span class="php-variable">$expected</span>}';
PHP
);
    $process
      ->start();
    $process
      ->wait();
    $this
      ->assertEquals($expected, $process
      ->getOutput());
  }
  public function testCommandLine() {
    $process = new PhpProcess(<<<PHP
<?php echo 'foobar';
PHP
);
    $f = new PhpExecutableFinder();
    $commandLine = $f
      ->find();
    $this
      ->assertSame($commandLine, $process
      ->getCommandLine(), '::getCommandLine() returns the command line of PHP before start');
    $process
      ->start();
    $this
      ->assertSame($commandLine, $process
      ->getCommandLine(), '::getCommandLine() returns the command line of PHP after start');
    $process
      ->wait();
    $this
      ->assertSame($commandLine, $process
      ->getCommandLine(), '::getCommandLine() returns the command line of PHP after wait');
  }

}

Members