public function renderCorrectlySetsTagNameAndAttributesAndContent() { $mockTagBuilder = $this->createMock(\TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder::class, array('setTagName', 'addAttribute', 'setContent')); $mockTagBuilder->expects($this->any())->method('setTagName')->with('a'); $mockTagBuilder->expects($this->once())->method('addAttribute')->with('href', 'someUri'); $mockTagBuilder->expects($this->once())->method('setContent')->with('some content'); $this->viewHelper->injectTagBuilder($mockTagBuilder); $this->uriBuilder->expects($this->any())->method('uriFor')->will($this->returnValue('someUri')); $this->viewHelper->expects($this->any())->method('renderChildren')->will($this->returnValue('some content')); $this->viewHelper->initialize(); $this->viewHelper->render('index'); }