/**
  * Create service
  *
  * @param ServiceLocatorInterface|ServiceManager $serviceLocator
  * @return FilterInterface
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $filter = new UglifyJs2Filter('./node_modules/.bin/uglifyjs');
     $filter->setCompress(true);
     $filter->setMangle(true);
     return $filter;
 }
 protected function factoryAf()
 {
     $uglify = new UglifyJs2Filter("/usr/bin/uglifyjs", "/usr/bin/node");
     $uglify->setCompress(true);
     $uglify->setMangle(true);
     $uglify->setCompress(true);
     $factory = new AssetFactory(__DIR__ . "/../");
     $filterManager = new FilterManager();
     $filterManager->set("uglify", $uglify);
     $factory->setFilterManager($filterManager);
     return $factory;
 }
 public function testBeautify()
 {
     $this->filter->setBeautify(true);
     $this->filter->filterDump($this->asset);
     $this->assertContains('    foo', $this->asset->getContent());
     $this->assertNotContains('/**', $this->asset->getContent());
 }