replacement @expectedException to setExpectedException
This commit is contained in:
@ -45,12 +45,10 @@ class PHPViewTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertEquals('vfs://root/views/', $this->view->getPath());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InitializationException
|
||||
* @expectedExceptionMessage Configuration must have a "path" set.
|
||||
*/
|
||||
|
||||
public function testPHPViewNullConstructor()
|
||||
{
|
||||
$this->setExpectedException('InitializationException', 'Configuration must have a "path" set.');
|
||||
$view = new PHPView(null);
|
||||
}
|
||||
|
||||
@ -86,12 +84,10 @@ class PHPViewTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertContains('New title', Registry::get('TitleViewHelper'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException GeneralException
|
||||
* @expectedExceptionMessage View helper "WriteViewHelper" not found.
|
||||
*/
|
||||
|
||||
public function testIllegalCall()
|
||||
{
|
||||
$this->setExpectedException('GeneralException', 'View helper "WriteViewHelper" not found.');
|
||||
$this->view->write('tony');
|
||||
}
|
||||
|
||||
@ -138,12 +134,9 @@ class PHPViewTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException GeneralException
|
||||
* @expectedExceptionMessage Template
|
||||
*/
|
||||
public function testErrorTemplate()
|
||||
{
|
||||
$this->setExpectedException('GeneralException', 'Template');
|
||||
$view = new PHPView(array('path' => 'error_path/'));
|
||||
|
||||
$result = $view->fetch('test');
|
||||
|
Reference in New Issue
Block a user