Example #1
0
 public function testLoadersAreFound()
 {
     $loader = new Loader();
     $this->assertGreaterThan(0, count($loader->getLoaders()));
 }
Example #2
0
File: Runner.php Project: djfm/ftr
 public function loadTests()
 {
     $files = $this->listTestFiles();
     $loader = new Loader();
     $loader->setBootstrap($this->bootstrap);
     $loader->setDataProviderFilter($this->dataProviderFilter);
     $loader->setFilter($this->filter);
     $testPlan = new ParallelTestPlan();
     foreach ($files as $file) {
         for ($n = 0; $n < $this->stress; ++$n) {
             $plan = $loader->loadFile($file);
             if ($plan) {
                 $testPlan->addTestPlan($plan);
             }
         }
     }
     $testsCount = $testPlan->getTestsCount();
     $countMessage = $testsCount > 1 ? 'Found %d tests to run.' : 'Found %d test to run.';
     $this->writeln(sprintf("<info>{$countMessage}</info>", $testsCount));
     $this->executionPlans = $testPlan->getExecutionPlans();
     $epsCount = count($this->executionPlans);
     $epsMessage = $testsCount > 1 ? 'Tests are split into %d execution plans.' : 'There is %d execution plan.';
     $this->writeln(sprintf("<comment>{$epsMessage}</comment>", $epsCount));
     $this->testsCount = $testsCount;
 }