Phalcon\Test\Unit\Tag\TagJavascriptIncludeTest::testJavascriptIncludeWithStringAsSecondParameterLocal PHP Method

testJavascriptIncludeWithStringAsSecondParameterLocal() public method

Tests javascriptInclude with a string as the second parameter - local link
Since: 2014-09-29
Author: Nikolaos Dimopoulos ([email protected])
    public function testJavascriptIncludeWithStringAsSecondParameterLocal()
    {
        $this->specify("javascriptInclude with a string as the second parameter local link returns invalid HTML", function () {
            Tag::resetInput();
            $options = ['js/phalcon.js'];
            $expected = '<script type="text/javascript" src="/js/phalcon.js"></script>' . PHP_EOL;
            $actual = Tag::javascriptInclude($options, 'hello');
            expect($actual)->equals($expected);
        });
    }