/** * A test ended. * * @param PHPUnit_Framework_Test $test * @param float $time */ public function endTest(\PHPUnit_Framework_Test $test, $time) { parent::endTest($test, $time); if ($test instanceof \Pagosoft\PSpec\Test) { $this->numAssertions += $test->getNumAssertions(); } }
public function endTest(\PHPUnit_Framework_Test $test, $time) { parent::endTest($test, $time); if ($this->debug) { foreach ($this->timeColors as $threshold => $color) { if ($time >= $threshold) { $timeColor = $color; break; } } $this->write(' '); $this->writeWithColor($timeColor, '[' . number_format($time, 3) . 's]', false); $this->write(' '); $this->writeWithColor('fg-cyan', \PHPUnit_Util_Test::describe($test), true); } }
public function endTest(PHPUnit_Framework_Test $test, $time) { if ($this->_verbose) { echo date('Y-m-d H:i:s') . ': finished ' . $test->toString() . " in {$time}\n\n"; } $app = Kwf_Registry::get('config')->application->id; if (!file_exists("/www/testtimes/{$app}")) { mkdir("/www/testtimes/{$app}"); } file_put_contents("/www/testtimes/{$app}/{$test->toString()}", $time); if ($this->_expectedTimes) { $this->_currentProgress += $this->_expectedTimes[$test->toString()]; $this->_currentTest++; } return parent::endTest($test, $time); }
public function endTest(PHPUnit_Framework_Test $test, $time) { $t = microtime(true) - $this->_timeStats['startTime']; if ($this->_timeStats['min'] > $t) { $this->_timeStats['min'] = $t; } if ($this->_timeStats['max'] < $t) { $this->_timeStats['max'] = $t; $this->_timeStats['slowest'] = $test->getName(); } $this->_timeStats['avg'] = ($t + $this->_timeStats['avg'] * $this->_timeStats['cnt']) / ++$this->_timeStats['cnt']; parent::endTest($test, $time); if ($this->_blDBResetPerTest && !isset($test->blNoDbResetAfterTest)) { $this->_oDBMaintenance->restoreDB($this->_iDBChangeMode, $this->_iDBChangeOutput); echo "|"; } }
/** * A test ended. * * @param PHPUnit_Framework_Test $test * @param float $time */ public function endTest(PHPUnit_Framework_Test $test, $time) { parent::endTest($test, $time); $this->printEvent('testFinished', ['name' => $test->getName(), 'duration' => (int) (round($time, 2) * 1000)]); }
/** * A test ended. * * @param PHPUnit_Framework_Test $test * @param float $time */ public function endTest(PHPUnit_Framework_Test $test, $time) { if (!$this->lastTestFailed) { $message = 'passed'; $this->write($this->colors ? Stagehand_TestRunner_Coloring::green($message) : $message); } parent::endTest($test, $time); $this->lastEvent = PHPUnit_TextUI_ResultPrinter::EVENT_TEST_END; }
/** * A test ended. * * @param PHPUnit_Framework_Test $test * @param float $time */ public function endTest(PHPUnit_Framework_Test $test, $time) { //echo __METHOD__.chr(10); if (!$this->lastTestFailed) { $this->printTestdox($test, 'X'); $this->lastTestFailed = true; // Make parent::endTest() shut up } parent::endTest($test, $time); }
/** * A test ended. * * @param PHPUnit_Framework_Test $test * @param float $time * @return void */ public function endTest(PHPUnit_Framework_Test $test, $time) { if (method_exists($test, 'getMessages')) { foreach ($test->getMessages() as $testMessage) { $testMessage = sprintf("%s [%s]", str_repeat(' ', $this->level), $testMessage); $this->write($testMessage . "\n"); } } if (!$this->lastTestFailed) { $message = sprintf("%s SUCCESS. (Duration: %s sec)", str_repeat(' ', $this->level), $this->getDuration()); if ($this->colors) { $this->write("[32;1m{$message}[0m" . "\n"); } else { $this->write($message . "\n"); } } $this->level--; return parent::endTest($test, $time); }
/** * A test ended. * * @param PHPUnit_Framework_Test $test * @param float $time */ public function endTest(PHPUnit_Framework_Test $test, $time) { parent::endTest($test, $time); wfDebugLog($this->logChannel, 'End test ' . $this->getTestName($test)); }
/** * A test ended. * * @param PHPUnit_Framework_Test $test * @param float $time */ public function endTest(PHPUnit_Framework_Test $test, $time) { if (!$this->lastTestFailed) { $message = 'passed'; $this->write($this->colors ? Stagehand_TestRunner_Coloring::green($message) : $message); } parent::endTest($test, $time); }
/** * A test ended. * * @param PHPUnit_Framework_Test $test * @param float $time */ public function endTest(PHPUnit_Framework_Test $test, $time) { if (!$this->colors) { parent::endTest($test, $time); return; } if (!$this->lastTestFailed) { $this->writeProgress(Stagehand_TestRunner_Coloring::green('.')); } if ($test instanceof PHPUnit_Framework_TestCase) { $this->numAssertions += $test->getNumAssertions(); } $this->lastEvent = self::EVENT_TEST_END; $this->lastTestFailed = false; }
/** * {@inheritdoc} */ public function endTest(\PHPUnit_Framework_Test $test, $time) { if ($this->debug) { return parent::endTest($test, $time); } if (!$this->lastTestFailed) { $this->writeProgress('pass'); } if ($test instanceof \PHPUnit_Framework_TestCase) { $this->numAssertions += $test->getNumAssertions(); } else { if ($test instanceof \PHPUnit_Extensions_PhptTestCase) { $this->numAssertions++; } } $this->lastTestFailed = FALSE; }
public function endTest(PHPUnit_Framework_Test $test, $time) { echo "\n" . date('Y-m-d H:i:s') . ': finished ' . $test->toString() . " in {$time}\n"; return parent::endTest($test, $time); }