Exemplo n.º 1
0
 public function testScriptsPaths()
 {
     $view = new View\Less();
     $view->setInputRootDir('/var/www/phrekyll-test/');
     $view->setInputFile('/var/www/phrekyll-test/scripts/some-entry.js')->setOutputDir('/var/www/output');
     $path = new OutputPath\Script($view);
     $this->assertSame('/var/www/output/scripts/some-entry.js', $path->get());
     $view->setInputFile('/var/www/phrekyll-test/scripts/sub/folder/some-entry.js')->setOutputDir('/var/www/output');
     $path->setView($view);
     $this->assertSame('/var/www/output/scripts/sub/folder/some-entry.js', $path->get());
     $view->setInputFile('/var/www/phrekyll-test/sub/folder/some-entry.js')->setOutputDir('/var/www/output');
     $path->setView($view);
     $this->assertSame('/var/www/output/sub/folder/some-entry.js', $path->get());
 }
Exemplo n.º 2
0
 public function testNoSourcePathSpecified()
 {
     $this->setExpectedException('RuntimeException', "View input file not specified");
     $view = new View();
     $rendered = $view->render();
 }