You are here

public function PhpProcessTest::testCommandLine 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::testCommandLine()

File

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

Class

PhpProcessTest

Namespace

Symfony\Component\Process\Tests

Code

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');
}