Author: Victor Farazdagi
Inheritance: extends Base, implements Phrozn\Processor
Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 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);
 }