replacement Exception() on InitializationException()
This commit is contained in:
@ -15,6 +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';
|
||||
|
||||
class MsgViewHelperTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
@ -29,15 +30,18 @@ class MsgViewHelperTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
public function testMsg()
|
||||
{
|
||||
|
||||
$this->helper->msg('new message from test', 'success');
|
||||
$this->assertSame(array('message' => 'new message from test', 'type' => 'success'), Session::get('MsgViewHelper'));
|
||||
|
||||
$this->assertSame($this->helper, $this->helper->msg('error message', 'error'));
|
||||
$this->assertSame(array('message' => 'error message', 'type' => 'error'), Session::get('MsgViewHelper'));
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Exception
|
||||
* @expectedException InitializationException
|
||||
* @expectedExceptionMessage Unknown message type
|
||||
*/
|
||||
public function testWrongType()
|
||||
|
Reference in New Issue
Block a user