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

testEntriesPaths() public method

public testEntriesPaths ( )
    public function testEntriesPaths()
    {
        $view = new View\Twig();
        $view->setInputRootDir('/var/www/phrozn-test/');
        $view->setInputFile('/var/www/phrozn-test/entries/some-entry.twig')->setOutputDir('/var/www/output');
        $path = new OutputPath\Entry($view);
        $this->assertSame('/var/www/output/some-entry.html', $path->get());
        $view->setInputFile('/var/www/phrozn-test/entries/sub/folder/some-entry.twig')->setOutputDir('/var/www/output');
        $path->setView($view);
        $this->assertSame('/var/www/output/sub/folder/some-entry.html', $path->get());
        $view->setInputFile('/var/www/phrozn-test/sub/folder/some-entry.twig')->setOutputDir('/var/www/output');
        $path->setView($view);
        $this->assertSame('/var/www/output/sub/folder/some-entry.html', $path->get());
    }