本文整理汇总了PHP中PHPUnit_Framework_TestCase::onNotSuccessfulTest方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_TestCase::onNotSuccessfulTest方法的具体用法?PHP PHPUnit_Framework_TestCase::onNotSuccessfulTest怎么用?PHP PHPUnit_Framework_TestCase::onNotSuccessfulTest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_TestCase
的用法示例。
在下文中一共展示了PHPUnit_Framework_TestCase::onNotSuccessfulTest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onNotSuccessfulTest
public function onNotSuccessfulTest(Exception $e)
{
if ($e instanceof Horde_Imap_Client_Exception) {
$e->setMessage($e->getMessage() . ' [' . self::$live->url . ']');
}
parent::onNotSuccessfulTest($e);
}
示例2: onNotSuccessfulTest
protected function onNotSuccessfulTest(\Exception $e)
{
if ($e instanceof PredictionException) {
$e = new \PHPUnit_Framework_AssertionFailedError($e->getMessage(), $e->getCode(), $e);
}
return parent::onNotSuccessfulTest($e);
}
示例3: onNotSuccessfulTest
protected function onNotSuccessfulTest(\Exception $e)
{
if ($e instanceof UnsupportedDriverActionException) {
$this->markTestSkipped($e->getMessage());
}
parent::onNotSuccessfulTest($e);
}
示例4: onNotSuccessfulTest
protected function onNotSuccessfulTest($e)
{
if ($e instanceof CM_Exception) {
$e = new CMTest_ExceptionWrapper($e);
}
parent::onNotSuccessfulTest($e);
}
示例5: onNotSuccessfulTest
protected function onNotSuccessfulTest(Exception $e)
{
if ($this->getStatus() != PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED) {
if ($this->isCritical) {
self::$skipAll = true;
}
if (!self::$isIT) {
self::$skipIT = true;
}
}
parent::onNotSuccessfulTest($e);
}
示例6: onNotSuccessfulTest
public function onNotSuccessfulTest(Exception $e)
{
self::sessionStrategy()->notSuccessfulTest();
parent::onNotSuccessfulTest($e);
}
示例7: onNotSuccessfulTest
public function onNotSuccessfulTest(Exception $e)
{
$this->getStrategy()->notSuccessfulTest();
parent::onNotSuccessfulTest($e);
}
示例8: onNotSuccessfulTest
protected function onNotSuccessfulTest(Exception $exception)
{
// drops and reconnect to a redis server on uncaught exceptions
RC::resetConnection();
parent::onNotSuccessfulTest($exception);
}
示例9: onNotSuccessfulTest
protected function onNotSuccessfulTest(\Exception $e)
{
parent::onNotSuccessfulTest($e);
$this->tearDown();
throw $e;
}
示例10: onNotSuccessfulTest
protected function onNotSuccessfulTest(\Exception $e)
{
exec(sprintf('rm -rf %s 2>&1 > /dev/null', $this->modelPath));
parent::onNotSuccessfulTest($e);
}
示例11: onNotSuccessfulTest
/**
* On not successful
* In case of an exeception $this->tearDown() will be called before processing this method anyways
*
* @throws PHPUnit_Framework_SyntheticError
* @param Exception $e
* @return void
*/
protected function onNotSuccessfulTest(Exception $e)
{
if (!($e instanceof PHPUnit_Framework_IncompleteTestError || $e instanceof PHPUnit_Framework_SkippedTestError) && $this->captureScreenshotOnFailure) {
try {
$this->takeScreenshot(get_class($e), PHPUnit_Framework_TestFailure::exceptionToString($e), Menta_Util_Screenshot::TYPE_ERROR, $e->getTrace());
} catch (Exception $screenshotException) {
// if there's an exception while taking a screenshot because a test was not successful. That's bad luck :)
throw new PHPUnit_Framework_SyntheticError($e->getMessage() . ' (AND: Exception while taking screenshot: ' . $screenshotException->getMessage() . ')', $e->getCode(), $e->getFile(), $e->getLine(), $e->getTrace());
}
}
parent::onNotSuccessfulTest($e);
}
示例12: onNotSuccessfulTest
public function onNotSuccessfulTest(Exception $e)
{
$this->destroy_file_if_exists(NeechyConfig::app_config_path());
parent::onNotSuccessfulTest($e);
}
示例13: onNotSuccessfulTest
/**
* This method is called when a test method did not execute successfully.
*
* @param \Exception $e Exception.
*
* @return void
*/
protected function onNotSuccessfulTest(\Exception $e)
{
$this->_eventDispatcher->dispatch(self::TEST_FAILED_EVENT, new TestFailedEvent($e, $this, $this->_session));
parent::onNotSuccessfulTest($e);
}
示例14: onNotSuccessfulTest
/**
* @param Exception $e
*
* @throws Exception
*/
protected function onNotSuccessfulTest(Exception $e)
{
parent::onNotSuccessfulTest($e);
}
示例15: onNotSuccessfulTest
/**
* handle all test failures
*
* @var \Exception $e
* @uses hadFailure
*/
protected function onNotSuccessfulTest($e)
{
echo $e->getMessage();
self::$hadFailure = true;
parent::onNotSuccessfulTest($e);
}