private function stubCompiler($extension) { $compiler = new ProcessorStub(); $compiler->setFileExtension($extension); $this->target->add($compiler); return $compiler; }
/** * @test */ public function getFileExtension_success() { $this->processor->setFileExtension('example.file'); $this->assertEquals('example.file', $this->target->getFileExtension()); $this->assertNull($this->cache->getEntry('example.file')); }
/** * @test */ public function addCompiler_success() { $compiler = new ProcessorStub(); $compiler->setFileExtension('css'); $this->assertSame($this->target, $this->target->addCompiler($compiler)); $list = $this->compiler->getAdded(); $this->assertNotEmpty($list); $this->assertSame($compiler, reset($list)); }