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