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

testAssetsManagerOutputJsWithoutImplicitOutputFromCollectionRemote() public method

collection tests
Since: 2014-10-13
Author: Nikolaos Dimopoulos ([email protected])
    public function testAssetsManagerOutputJsWithoutImplicitOutputFromCollectionRemote()
    {
        $this->specify("The outputJs using a collection does not produce the correct result", function () {
            $assets = new Manager();
            $assets->collection('header')->setPrefix('http:://cdn.example.com/')->setLocal(false)->addJs('js/script1.js')->addJs('js/script2.js');
            $assets->useImplicitOutput(false);
            $actual = $assets->outputJs('header');
            $expected = sprintf("%s\n%s\n", '<script type="text/javascript" src="http:://cdn.example.com/js/script1.js"></script>', '<script type="text/javascript" src="http:://cdn.example.com/js/script2.js"></script>');
            expect($actual)->equals($expected);
        });
    }