Phalcon\Test\Proxy\Assets\Manager::outputJs PHP Method

outputJs() public method

public outputJs ( $collectionName = null )
    public function outputJs($collectionName = null)
    {
        return parent::outputJs($collectionName);
    }

Usage Example

Beispiel #1
0
 /**
  * Tests output with disabled join
  *
  * @author Serghei Iakovlev <*****@*****.**>
  * @since  2016-01-24
  */
 public function testOutputWithJoinAndFilter()
 {
     $this->specify("The outputJs using a collection and with enabled join and filter does not produce the correct result", function () {
         $assets = new Manager();
         $assets->useImplicitOutput(false);
         $assets->collection('js')->addJs(PATH_DATA . 'assets/jquery.js', false, false)->setTargetPath(PATH_OUTPUT . "tests/assets/combined.js")->setTargetUri('production/combined.js')->join(false)->addFilter(new None());
         $expected = sprintf('<script type="text/javascript" src="%s"></script>%s', PATH_DATA . 'assets/jquery.js', PHP_EOL);
         expect($assets->outputJs('js'))->equals($expected);
     });
 }