replacement @expectedException to setExpectedException
This commit is contained in:
@ -14,22 +14,15 @@ require_once dirname(__FILE__) . '/../../exception/GeneralException.php';
|
||||
|
||||
class GeneralExceptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @expectedException GeneralException
|
||||
*/
|
||||
public function testGeneralException()
|
||||
{
|
||||
$this->setExpectedException('GeneralException');
|
||||
throw new GeneralException();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException GeneralException
|
||||
* @expectedExceptionMessage GeneralException message
|
||||
* @excpectedExceptionCode 1
|
||||
*/
|
||||
public function testGeneralExceptionMessage()
|
||||
{
|
||||
$this->setExpectedException('GeneralException', 'GeneralException message', 1);
|
||||
throw new GeneralException('GeneralException message', 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user