function simpletest_phpunit_command

Returns the command to run PHPUnit.

1 call to simpletest_phpunit_command()
simpletest_phpunit_run_command in drupal/core/modules/simpletest/simpletest.module
Executes the phpunit command.

File

drupal/core/modules/simpletest/simpletest.module, line 268
Provides testing functionality.

Code

function simpletest_phpunit_command() {

  // Don't use the committed version in composer's bin dir if running on
  // windows.
  if (substr(PHP_OS, 0, 3) == 'WIN') {
    $php_executable_finder = new PhpExecutableFinder();
    $php = $php_executable_finder
      ->find();
    $phpunit_bin = escapeshellarg($php) . " -f " . escapeshellarg(DRUPAL_ROOT . "/core/vendor/phpunit/phpunit/composer/bin/phpunit") . " --";
  }
  else {
    $phpunit_bin = DRUPAL_ROOT . "/core/vendor/bin/phpunit";
  }
  return $phpunit_bin;
}