Phalcon\Test\Unit\Mvc\View\SimpleTest::testMissingView PHP Method

testMissingView() public method

Tests render with missing view
Since: 2014-05-28
Author: Kamil Skowron ([email protected])
public testMissingView ( )
    public function testMissingView()
    {
        $this->specify('The View component does not throw Exception in case of missing view', function () {
            $view = new Simple();
            $view->setViewsDir(PATH_DATA . 'views' . DIRECTORY_SEPARATOR);
            $view->render('test1/index');
        }, ['throws' => [Exception::class, "View '" . PATH_DATA . 'views' . DIRECTORY_SEPARATOR . 'test1' . DIRECTORY_SEPARATOR . "index' was not found in the views directory"]]);
    }