Neos\FluidAdaptor\Tests\Unit\ViewHelpers\Link\ExternalViewHelperTest::renderCorrectlySetsTagNameAndAttributesAndContent PHP Метод

renderCorrectlySetsTagNameAndAttributesAndContent() публичный Метод

    public function renderCorrectlySetsTagNameAndAttributesAndContent()
    {
        $mockTagBuilder = $this->createMock(TagBuilder::class, array('setTagName', 'addAttribute', 'setContent'));
        $mockTagBuilder->expects($this->any())->method('setTagName')->with('a');
        $mockTagBuilder->expects($this->once())->method('addAttribute')->with('href', 'http://www.some-domain.tld');
        $mockTagBuilder->expects($this->once())->method('setContent')->with('some content');
        $this->viewHelper->_set('tag', $mockTagBuilder);
        $this->viewHelper->expects($this->any())->method('renderChildren')->will($this->returnValue('some content'));
        $this->viewHelper->initialize();
        $this->viewHelper->render('http://www.some-domain.tld');
    }