/** * Build LESS files * * @param array $files * * @throws RuntimeException */ public function build($files, OutputInterface $output = null) { foreach ($files as $lessFile => $target) { $this->filesystem->mkdir(dirname($target)); if (null !== $output) { $output->writeln(" Building <info>" . basename($target) . "</info>... <comment>OK</comment>"); } $this->compiler->compile($target, $lessFile); } }
/** * @expectedException \Alchemy\Phrasea\Exception\RuntimeException */ public function testCompileExecutionFailure() { $recessDriver = $this->getMockBuilder('Alchemy\\Phrasea\\Command\\Developer\\Utils\\RecessDriver')->disableOriginalConstructor()->getMock(); $recessDriver->expects($this->once())->method('command')->will($this->throwException(new ExecutionFailureException())); $filesystem = $this->getMock('Symfony\\Component\\Filesystem\\Filesystem'); $compiler = new Compiler($filesystem, $recessDriver); $compiler->compile(__DIR__ . '/output.css', __FILE__); }