Esempio n. 1
0
 /**
  * Parses a test case and returns the test class
  * @return ParsedClass
  */
 protected function parseFile($path)
 {
     $parser = new Parser($path);
     return $parser->getClass();
 }
Esempio n. 2
0
 /**
  * Called after all files are loaded. Parses loaded files into
  * ExecutableTest objects - either Suite or TestMethod
  */
 private function initSuites()
 {
     foreach ($this->files as $path) {
         try {
             $parser = new Parser($path);
             if ($class = $parser->getClass()) {
                 $this->loadedSuites[$path] = $this->createSuite($path, $class);
             }
         } catch (NoClassInFileException $e) {
             continue;
         }
     }
 }
Esempio n. 3
0
 /**
  * Called after all files are loaded. Parses loaded files into
  * ExecutableTest objects - either Suite or TestMethod
  */
 private function initSuites()
 {
     foreach ($this->files as $path) {
         $parser = new Parser($path);
         if ($class = $parser->getClass()) {
             $this->loadedSuites[$path] = new Suite($path, $this->executableTests($path, $class->getMethods($this->options ? $this->options->annotations : array())), $class->getName());
         }
     }
 }