replacement @expectedException to setExpectedException
This commit is contained in:
@ -28,19 +28,19 @@ class GetViewHelperTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* @TODO: GetViewHelper: initialize GetViewHelper::$get with empty array()
|
||||
* @expectedException PHPUnit_Framework_Error
|
||||
*/
|
||||
public function testGetWithNull()
|
||||
{
|
||||
$this->setExpectedException('PHPUnit_Framework_Error');
|
||||
$this->helper->get(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @TODO: GetViewHelper: check $_GET not null
|
||||
* @expectedException PHPUnit_Framework_Error
|
||||
*/
|
||||
public function testGetEmptyGET()
|
||||
{
|
||||
$this->setExpectedException('PHPUnit_Framework_Error');
|
||||
$result = $this->helper->get('param');
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/../../../view/iView.php';
|
||||
require_once dirname(__FILE__) . '/../../../view/PHPView.php';
|
||||
require_once dirname(__FILE__) . '/../../../view/helpers/ViewHelper.php';
|
||||
require_once dirname(__FILE__) . '/../../../view/helpers/MsgViewHelper.php';
|
||||
require_once dirname(__FILE__) . '/../../../exception/InitializationException.php';
|
||||
require_once dirname(__FILE__) . '/../../../exception/GeneralException.php';
|
||||
|
||||
class MsgViewHelperTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
@ -39,13 +39,10 @@ class MsgViewHelperTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException GeneralException
|
||||
* @expectedExceptionMessage Unknown message type
|
||||
*/
|
||||
|
||||
public function testWrongType()
|
||||
{
|
||||
$this->setExpectedException('GeneralException', 'Unknown message type');
|
||||
$this->helper->msg('some message', 'wrong');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user