PhroznTest\Site\View\OutputPathTest::testStylesPaths PHP Method

testStylesPaths() public method

public testStylesPaths ( )
    public function testStylesPaths()
    {
        $view = new View\Less();
        $view->setInputRootDir('/var/www/phrozn-test/');
        $view->setInputFile('/var/www/phrozn-test/styles/some-entry.less')->setOutputDir('/var/www/output');
        $path = new OutputPath\Style($view);
        $this->assertSame('/var/www/output/styles/some-entry.css', $path->get());
        $view->setInputFile('/var/www/phrozn-test/styles/sub/folder/some-entry.less')->setOutputDir('/var/www/output');
        $path->setView($view);
        $this->assertSame('/var/www/output/styles/sub/folder/some-entry.css', $path->get());
        $view->setInputFile('/var/www/phrozn-test/sub/folder/some-entry.less')->setOutputDir('/var/www/output');
        $path->setView($view);
        $this->assertSame('/var/www/output/sub/folder/some-entry.css', $path->get());
    }