Phalcon\Test\Unit\Tag\TagStylesheetlinkTest::testStylesheetLinkArrayParameterLocal PHP Method

testStylesheetLinkArrayParameterLocal() public method

Tests stylesheetLink with array parameter for a local link
Since: 2014-09-12
Author: Nikolaos Dimopoulos ([email protected])
Author: Dreamszhu ([email protected])
    public function testStylesheetLinkArrayParameterLocal()
    {
        $this->specify("stylesheetLink with array parameter local returns invalid HTML Strict", function () {
            Tag::resetInput();
            $options = ['css/phalcon.css'];
            $expected = '<link rel="stylesheet" type="text/css" ' . 'href="/css/phalcon.css" />' . PHP_EOL;
            Tag::setDocType(Tag::XHTML10_STRICT);
            $actual = Tag::stylesheetLink($options);
            expect($actual)->equals($expected);
        });
        $this->specify("stylesheetLink with array parameter local returns invalid HTML HTML5", function () {
            Tag::resetInput();
            $options = ['css/phalcon.css'];
            $expected = '<link rel="stylesheet" type="text/css" ' . 'href="/css/phalcon.css">' . PHP_EOL;
            Tag::setDocType(Tag::HTML5);
            $actual = Tag::stylesheetLink($options);
            expect($actual)->equals($expected);
        });
    }