public static function PHPUnit_TextUI_TestRunner::run

Parameters

mixed $test:

array $arguments:

Throws

PHPUnit_Framework_Exception

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php, line 104

Class

PHPUnit_TextUI_TestRunner
A TestRunner for the Command Line Interface (CLI) PHP SAPI Module.

Code

public static function run($test, array $arguments = array()) {
  if ($test instanceof ReflectionClass) {
    $test = new PHPUnit_Framework_TestSuite($test);
  }
  if ($test instanceof PHPUnit_Framework_Test) {
    $aTestRunner = new PHPUnit_TextUI_TestRunner();
    return $aTestRunner
      ->doRun($test, $arguments);
  }
  else {
    throw new PHPUnit_Framework_Exception('No test case or test suite found.');
  }
}