Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/PhpRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,20 @@ public function testRenderedViewModelIsRegisteredAsCurrentViewModel()
$this->assertSame($model, $helper->getCurrent());
}

public function testRendererRaisesExceptionInCaseOfExceptionInView()
{
$resolver = new TemplateMapResolver(array(
'exception' => __DIR__ . '../../Mvc/View/_files/exception.phtml',
));
$this->renderer->setResolver($resolver);

$model = new ViewModel();
$model->setTemplate('exception');

$this->setExpectedException('Exception', 'thrown from view script');
$this->renderer->render($model);
}

public function testRendererRaisesExceptionIfResolverCannotResolveTemplate()
{
$expected = '10 > 9';
Expand Down

0 comments on commit c1d2c49

Please sign in to comment.