public function testMinify() { $jsText = '/* Some comment that should be deleted */ function foo() { return "bar"; }'; $this->assertEquals('function foo(){return"bar";}', JSMin::minify($jsText)); }
public function filterDump(AssetInterface $asset) { switch ($this->type) { case 'css': $cssMin = new CSSMin(); $content = $cssMin->run($asset->getContent()); break; case 'js': $content = JSMin::minify($asset->getContent()); break; } $asset->setContent($content); }