Exemplo n.º 1
0
 /**
  * Minifies the provided JS source
  * @param string $source JS source
  * @param zibo\library\filesystem\File $file The file of the source
  * @return string Minified JS source
  */
 protected function optimizeSource($source, File $file)
 {
     $minified = JSMin::minify($source);
     return str_replace('"+++', '"+ ++', $minified);
 }
Exemplo n.º 2
0
 /**
  * @dataProvider providerMinify
  */
 public function testMinify($expected, $source)
 {
     $result = JSMin::minify($source);
     $this->assertEquals($expected, $result);
 }