コード例 #1
0
 /**
  * Implement PHPUnit_Framework_TestListener, save driver content if there was an error
  * @param \PHPUnit_Framework_Test                 $test
  * @param \PHPUnit_Framework_AssertionFailedError $failure
  * @param integer                                 $time
  */
 public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $failure, $time)
 {
     if ($test instanceof Testcase_Spiderling and $test->is_driver_active() and $test->driver()->is_page_active()) {
         $this->save_driver_content($test->driver(), get_class($test) . '_' . $test->getName(FALSE), $failure->getMessage());
     }
 }