/** * Parses a test case and returns the test class * @return ParsedClass */ protected function parseFile($path) { $parser = new Parser($path); return $parser->getClass(); }
/** * 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; } } }
/** * 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()); } } }