public function viewHelperRendersUriViaContextNodePathString() { $this->assertOutputLinkValid('en/home.html', $this->viewHelper->render('/sites/example/home@live')); $this->assertOutputLinkValid('en/home/about-us.html', $this->viewHelper->render('/sites/example/home/about-us@live')); $this->assertOutputLinkValid('en/home/about-us/our-mission.html', $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->assertOutputLinkValid('en/home.html', $this->viewHelper->render('/sites/example/home@live')); $this->assertOutputLinkValid('en/home/about-us.html', $this->viewHelper->render('/sites/example/home/about-us@live')); $this->assertOutputLinkValid('en/home/about-us/our-mission.html', $this->viewHelper->render('/sites/example/home/about-us/mission@live')); }