private function run() { $start = microtime(true); foreach ($this->Tests as $test) { if (class_exists('\\codespy\\Analyzer')) { \codespy\Analyzer::$currenttest = $test->getTestName(); } $result = $test->run(); if (class_exists('\\codespy\\Analyzer')) { \codespy\Analyzer::$currenttest = ''; } if ($result) { $message = $test->getTestName() . ' - ' . $this->Text->Passed; $this->Results[] = new TestMessage($message, $test, true); } else { $message = '[' . str_replace('{0}', $test->getLine(), str_replace('{1}', $test->getFile(), $this->Text->LineFile)) . '] ' . $test->getTestName() . ' - ' . $this->Text->Failed . ' - ' . $test->getMessage(); $this->Errors[] = new TestMessage($message, $test, false); } } $this->Duration = microtime(true) - $start; }