replacement @expectedException to setExpectedException

This commit is contained in:
Vyacheslav Agafonov
2011-12-01 12:25:27 +04:00
parent 9943b6afcf
commit 71ffa06eaa
4 changed files with 8 additions and 32 deletions

View File

@ -15,22 +15,15 @@ require_once dirname(__FILE__) . '/../../exception/Error404Exception.php';
class Error404ExceptionTest extends PHPUnit_Framework_TestCase
{
/**
* @expectedException Error404Exception
*/
public function testError404Exception()
{
$this->setExpectedException('Error404Exception');
throw new Error404Exception();
}
/**
* @expectedException Error404Exception
* @expectedExceptionMessage Error404Exception message
* @excpectedExceptionCode 1
*/
public function testError404ExceptionMessage()
{
$this->setExpectedException('Error404Exception', 'Error404Exception message', 10);
throw new Error404Exception('Error404Exception message', 10);
}