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.

28 lines
723 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. public function testGeneralException()
  15. {
  16. $this->setExpectedException('GeneralException');
  17. throw new GeneralException();
  18. }
  19. public function testGeneralExceptionMessage()
  20. {
  21. $this->setExpectedException('GeneralException', 'GeneralException message', 1);
  22. throw new GeneralException('GeneralException message', 1);
  23. }
  24. }