Exemple #1
0
 public function testIssue1532()
 {
     $this->markTestIncomplete('To be checked');
     @unlink(__DIR__ . '/assets/production/1532.js');
     $di = new \Phalcon\DI\FactoryDefault();
     $assets = new \PhTAssetsManager();
     $assets->useImplicitOutput(false);
     $assets->collection('js')->addJs('unit-tests/assets/jquery.js')->join(true)->addFilter(new Phalcon\Assets\Filters\Jsmin())->setTargetPath(__DIR__ . '/assets/production/1532.js')->setTargetLocal(false)->setPrefix('//phalconphp.com/')->setTargetUri('js/jquery.js');
     $this->assertEquals($assets->outputJs('js'), '<script type="text/javascript" src="//phalconphp.com/js/jquery.js"></script>' . PHP_EOL);
 }
 /**
  * collection tests
  *
  * @author Nikolaos Dimopoulos <*****@*****.**>
  * @since  2014-10-13
  */
 public function testAssetsManagerOutputJsWithoutImplicitOutputFromCollectionRemote()
 {
     $this->markTestSkipped('To be tested');
     $this->specify("The outputJs using a collection does not produce the correct result", function () {
         $this->prepareDI();
         $assets = new PhTAssetsManager();
         $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 = '<script type="text/javascript" src="http:://cdn.example.com/js/script1.js"></script>' . PHP_EOL . '<script type="text/javascript" src="http:://cdn.example.com/js/script2.js"></script>' . PHP_EOL;
         expect($actual)->equals($expected);
     });
 }