You are here

public function ExecutableFinderTest::testFindProcessInOpenBasedir in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/process/Tests/ExecutableFinderTest.php \Symfony\Component\Process\Tests\ExecutableFinderTest::testFindProcessInOpenBasedir()

File

vendor/symfony/process/Tests/ExecutableFinderTest.php, line 113

Class

ExecutableFinderTest
@author Chris Smith <chris@cs278.org>

Namespace

Symfony\Component\Process\Tests

Code

public function testFindProcessInOpenBasedir() {
  if (ini_get('open_basedir')) {
    $this
      ->markTestSkipped('Cannot test when open_basedir is set');
  }
  if (!defined('PHP_BINARY')) {
    $this
      ->markTestSkipped('Requires the PHP_BINARY constant');
  }
  if ('\\' === DIRECTORY_SEPARATOR) {
    $this
      ->markTestSkipped('Cannot run test on windows');
  }
  $this
    ->setPath('');
  $this
    ->iniSet('open_basedir', PHP_BINARY . (!defined('HHVM_VERSION') ? PATH_SEPARATOR . '/' : ''));
  $finder = new ExecutableFinder();
  $result = $finder
    ->find($this
    ->getPhpBinaryName(), false);
  $this
    ->assertSamePath(PHP_BINARY, $result);
}