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.

35 lines
792 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 GeneralException class
  10. */
  11. require_once dirname(__FILE__) . '/../../exception/GeneralException.php';
  12. class GeneralExceptionTest extends PHPUnit_Framework_TestCase
  13. {
  14. /**
  15. * @expectedException GeneralException
  16. */
  17. public function testGeneralException()
  18. {
  19. throw new GeneralException();
  20. }
  21. /**
  22. * @expectedException GeneralException
  23. * @expectedExceptionMessage GeneralException message
  24. * @excpectedExceptionCode 1
  25. */
  26. public function testGeneralExceptionMessage()
  27. {
  28. throw new GeneralException('GeneralException message', 1);
  29. }
  30. }