Phalcon\Test\Unit\Mvc\View\Engine\Volt\CompilerTest::testVoltRuntimeError PHP Method

testVoltRuntimeError() public method

    public function testVoltRuntimeError()
    {
        $this->specify("Volt parser doesn't throw the proper runtime error", function () {
            $volt = new Compiler();
            $volt->compileString('{{ "hello"|unknown }}');
        }, ["throws" => [\Phalcon\Mvc\View\Engine\Volt\Exception::class, 'Unknown filter "unknown" in eval code on line 1']]);
        $this->specify("Volt parser doesn't throw the proper runtime error (2)", function () {
            $volt = new Compiler();
            $volt->compileString('{{ "hello"|unknown(1, 2, 3) }}');
        }, ["throws" => [\Phalcon\Mvc\View\Engine\Volt\Exception::class, 'Unknown filter "unknown" in eval code on line 1']]);
        $this->specify("Volt parser doesn't throw the proper runtime error (3)", function () {
            $volt = new Compiler();
            $volt->compileString('{{ "hello"|(a-1) }}');
        }, ["throws" => [\Phalcon\Mvc\View\Engine\Volt\Exception::class, 'Unknown filter type in eval code on line 1']]);
    }