36 lines
792 B
PHP
36 lines
792 B
PHP
![]() |
<?php
|
||
|
|
||
|
/*
|
||
|
* @copyright NetMonsters <team@netmonsters.ru>
|
||
|
* @link http://netmonsters.ru
|
||
|
* @package Majestic
|
||
|
* @subpackage UnitTests
|
||
|
* @since 2011-10-11
|
||
|
*
|
||
|
* Unit tests for GeneralException class
|
||
|
*/
|
||
|
|
||
|
require_once dirname(__FILE__) . '/../../exception/GeneralException.php';
|
||
|
|
||
|
class GeneralExceptionTest extends PHPUnit_Framework_TestCase
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* @expectedException GeneralException
|
||
|
*/
|
||
|
public function testGeneralException()
|
||
|
{
|
||
|
throw new GeneralException();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @expectedException GeneralException
|
||
|
* @expectedExceptionMessage GeneralException message
|
||
|
* @excpectedExceptionCode 1
|
||
|
*/
|
||
|
public function testGeneralExceptionMessage()
|
||
|
{
|
||
|
throw new GeneralException('GeneralException message', 1);
|
||
|
}
|
||
|
|
||
|
}
|