/** * @param string $source * @return string */ protected function minifyWithClosureCompilerService($source) { $minifier = new ClosureCompilerService(); $minifier->compilationLevel = 'SIMPLE_OPTIMIZATIONS'; $minifier->timeout = 60; $output = $minifier->minify($source); return $output; }
/** * @testdox Throws an exception in case of a compilation error * @expectedException RuntimeException * @expectedExceptionMessage Parse error. Semi-colon expected */ public function testCompilationError() { $minifier = new ClosureCompilerService(); $minifier->minify('This should fail'); }