Phalcon\Test\Unit\Assets\ManagerTest::testAssetsManagerOutputCssWithImplicitOutput PHP Method

testAssetsManagerOutputCssWithImplicitOutput() public method

outputCss - implicitOutput tests
Since: 2014-10-13
Author: Nikolaos Dimopoulos ([email protected])
    public function testAssetsManagerOutputCssWithImplicitOutput()
    {
        $this->specify("The outputCss with implicitOutput does not produce the correct result", function () {
            $assets = new Manager();
            $assets->addCss('css/style1.css');
            $assets->addCss('css/style2.css');
            $assets->addResource(new Css('/css/style.css', false));
            $expected = sprintf("%s\n%s\n%s\n", '<link rel="stylesheet" type="text/css" href="/css/style1.css" />', '<link rel="stylesheet" type="text/css" href="/css/style2.css" />', '<link rel="stylesheet" type="text/css" href="/css/style.css" />');
            ob_start();
            $assets->outputCss();
            expect(ob_get_clean())->equals($expected);
        });
    }