You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
806 B

  1. <?php
  2. /*
  3. * @copyright NetMonsters <team@netmonsters.ru>
  4. * @link http://netmonsters.ru
  5. * @package Majestic
  6. * @subpackage UnitTests
  7. * @since 2011-10-11
  8. *
  9. * Unit tests for Error404Exception class
  10. */
  11. require_once dirname(__FILE__) . '/../../exception/GeneralException.php';
  12. require_once dirname(__FILE__) . '/../../exception/Error404Exception.php';
  13. class Error404ExceptionTest extends PHPUnit_Framework_TestCase
  14. {
  15. public function testError404Exception()
  16. {
  17. $this->setExpectedException('Error404Exception');
  18. throw new Error404Exception();
  19. }
  20. public function testError404ExceptionMessage()
  21. {
  22. $this->setExpectedException('Error404Exception', 'Error404Exception message', 10);
  23. throw new Error404Exception('Error404Exception message', 10);
  24. }
  25. }