Example #1
0
 private function determineTestSuite(Test $test, TestName $name)
 {
     $filter = $this->configuration->getFilter();
     $factory = $this->configuration->getTestSuiteFactory();
     $first = $name->part(0);
     if (class_exists($first)) {
         $test = $factory->getTestSuite($first, $filter);
     }
     $file = $this->configuration->fullPath($first);
     if (file_exists($file)) {
         $test = new FileTestSuite($factory, $filter, $this->configuration->fullPath(), $first);
     }
     return $this->resolveTest($test, $name);
 }
Example #2
0
 public function fullPath($path = '')
 {
     return $this->config->fullPath($path);
 }
Example #3
0
 function configureTestSuiteFactory()
 {
     $this->files->givenTheFile_Containing('scrut.json', json_encode(['runner' => ReadConfiguration_TestRunner::class, 'factory' => ReadConfiguration_Factory::class]));
     $this->whenIExecuteTheCommand();
     $this->assert->isInstanceOf($this->config->getTestSuiteFactory(), ReadConfiguration_Factory::class);
 }
Example #4
0
 /**
  * @param string $cwd
  * @param Test $test
  * @param TestRunListener $listener
  */
 function __construct($cwd, Test $test, TestRunListener $listener)
 {
     parent::__construct(new Factory(), $cwd, []);
     $this->test = $test;
     $this->listener = $listener;
 }