/** * @param FileContainer $file * * @throws FileException */ protected function fetchInputContextIntoFile(FileContainer $file) { if (!file_exists($file->getInputPath())) { throw new FileException("file: {$file->getInputPath()} doesn't exists"); } $file->setInputContent(file_get_contents($file->getInputPath())); }
/** * @see Processor::processFile * @test * * @expectedException \EM\CssCompiler\Exception\CompilerException */ public function processFileExpectedException() { $file = new FileContainer(static::getSharedFixturesDirectory() . '/compass', ''); $file->setInputContent(file_get_contents($file->getInputPath())); $file->setType(FileContainer::TYPE_UNKNOWN); (new Processor($this->io))->processFile($file); }