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