getInstance() public static method

Returns the singleton instance.
public static getInstance ( ) : Runner
return Runner The singleton instance
コード例 #1
0
ファイル: PhoTestCase.php プロジェクト: elliotchance/concise
 public function run(PHPUnit_Framework_TestResult $result = null)
 {
     if ($result === null) {
         $result = $this->createResult();
     }
     ConciseReporter::$test = $this;
     ConciseReporter::$testCase = new IndependentTestCase();
     ConciseReporter::$result = $result;
     // Create a new Console and parse arguments
     $console = new Console(array('--reporter', 'concise'), 'php://stdout');
     $console->parseArguments();
     // Start the runner
     Runner::$console = $console;
     Runner::getInstance()->run();
     return $result;
 }
コード例 #2
0
ファイル: yii_tc_pho.php プロジェクト: steepdevs/yii-tc-pho
/**
 * Calls the runner's afterEach() method, defining a closure to be ran after
 * each of the parent suite's nested suites and specs.
 *
 * @param \Closure $closure The closure to be ran after the suite
 */
function afterEach(\Closure $closure)
{
    Runner::getInstance()->afterEach($closure);
}