Пример #1
0
 /**
  * @access protected
  */
 protected function runTest()
 {
     $timer = new Benchmark_Timer();
     $timer->start();
     parent::runTest();
     $timer->stop();
     if ($this->maxRunningTime != 0 && $timer->timeElapsed() > $this->maxRunningTime) {
         $this->fail(sprintf('expected running time: <= %s but was: %s', $this->maxRunningTime, $timer->timeElapsed()));
     }
 }
 /**
  * @access protected
  */
 protected function runTest()
 {
     try {
         parent::runTest();
     } catch (Exception $e) {
         if (is_a($e, $this->expected)) {
             return;
         } else {
             throw $e;
         }
     }
     $this->fail('Expected exception ' . $this->expected);
 }
Пример #3
0
 /**
  * @access protected
  */
 protected function runTest()
 {
     try {
         parent::runTest();
     } catch (Exception $e) {
         if ($this->expectedException !== NULL && $e instanceof $this->expectedException) {
             return;
         } else {
             throw $e;
         }
     }
     if ($this->expectedException !== NULL) {
         $this->fail('Expected exception ' . $this->expectedException);
     }
 }