public function viewHelperRendersUriViaContextNodePathString() { $this->assertSame('<a href="/en/home.html">Home</a>', $this->viewHelper->render('/sites/example/home@live')); $this->assertSame('<a href="/en/home/about-us.html">About Us Test</a>', $this->viewHelper->render('/sites/example/home/about-us@live')); $this->assertSame('<a href="/en/home/about-us/our-mission.html">Our mission</a>', $this->viewHelper->render('/sites/example/home/about-us/mission@live')); // The tests should also work in a regular fluid view, so we set that and repeat the tests $mockView = $this->getAccessibleMock(TemplateView::class, array(), array(), '', false); $viewHelperVariableContainer = new ViewHelperVariableContainer(); $viewHelperVariableContainer->setView($mockView); $this->inject($this->viewHelper, 'viewHelperVariableContainer', $viewHelperVariableContainer); $this->assertSame('<a href="/en/home.html">Home</a>', $this->viewHelper->render('/sites/example/home@live')); $this->assertSame('<a href="/en/home/about-us.html">About Us Test</a>', $this->viewHelper->render('/sites/example/home/about-us@live')); $this->assertSame('<a href="/en/home/about-us/our-mission.html">Our mission</a>', $this->viewHelper->render('/sites/example/home/about-us/mission@live')); }