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

testRenderWithFilenameWithEngineWithoutEngineRegistered() public method

Tests render with filename without registered
Since: 2014-05-28
Author: Kamil Skowron ([email protected])
    public function testRenderWithFilenameWithEngineWithoutEngineRegistered()
    {
        $this->specify('Render with filename without registered engine does not throw Exception', function () {
            $view = new Simple();
            $view->setDI(Di::getDefault());
            $view->setViewsDir(PATH_DATA . 'views' . DIRECTORY_SEPARATOR);
            $view->setParamToView('name', 'FooBar');
            $view->render('test4/index.mhtml');
        }, ['throws' => [Exception::class, "View '" . PATH_DATA . 'views' . DIRECTORY_SEPARATOR . 'test4' . DIRECTORY_SEPARATOR . "index.mhtml' was not found in the views directory"]]);
    }