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.

36 lines
878 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. /**
  16. * @expectedException Error404Exception
  17. */
  18. public function testError404Exception()
  19. {
  20. throw new Error404Exception();
  21. }
  22. /**
  23. * @expectedException Error404Exception
  24. * @expectedExceptionMessage Error404Exception message
  25. * @excpectedExceptionCode 1
  26. */
  27. public function testError404ExceptionMessage()
  28. {
  29. throw new Error404Exception('Error404Exception message', 10);
  30. }
  31. }