public function testRenderImportLessDirective() { $tpl = file_get_contents($this->path . 'tpl2.less'); $expectedResult = file_get_contents($this->path . 'tpl1.css'); $processor = new Processor(); $processor->setConfig(array('phr_template_dir' => $this->path)); $rendered = $processor->render($tpl); $this->assertSame(trim($rendered), trim($expectedResult)); }
public function testRender() { $configSample = array('some' => 'setting'); $processor = new Processor($configSample); $tpl = file_get_contents($this->path . 'tpl1.less'); $rendered = $processor->render($tpl, array('some' => 'val')); $static = file_get_contents($this->path . 'tpl1.css'); $this->assertSame(trim($static), trim($rendered)); $this->assertSame($processor->getConfig(), $configSample); }