Changeset 8638
- Timestamp:
- 04/27/08 15:20:06 (6 months ago)
- Files:
-
- branches/1.1/lib/test/sfTestBrowser.class.php (modified) (1 diff)
- branches/1.1/lib/util/sfBrowser.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/test/sfTestBrowser.class.php
r8530 r8638 383 383 384 384 return $this; 385 } 386 387 /** 388 * Trigger a test failure if an uncaught exception is present. 389 * 390 * @return boolean 391 */ 392 public function checkCurrentExceptionIsEmpty() 393 { 394 if (false === ($empty = parent::checkCurrentExceptionIsEmpty())) 395 { 396 $this->test()->fail(sprintf('last request threw an uncatched exception "%s: %s"', get_class($this->getCurrentException()), $this->getCurrentException()->getMessage())); 397 } 398 399 return $empty; 385 400 } 386 401 branches/1.1/lib/util/sfBrowser.class.php
r8533 r8638 459 459 } 460 460 461 /** 462 * Test for an uncaught exception. 463 * 464 * @return boolean 465 */ 461 466 public function checkCurrentExceptionIsEmpty() 462 467 { 463 if (is_null($this->getCurrentException()) || $this->getCurrentException() instanceof sfError404Exception) 464 { 465 return; 466 } 467 468 $this->test->fail(sprintf('last request threw an uncatched exception "%s: %s"', get_class($this->getCurrentException()), $this->getCurrentException()->getMessage())); 468 return is_null($this->getCurrentException()) || $this->getCurrentException() instanceof sfError404Exception; 469 469 } 470 470