2 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Link;
36 protected function setUp()
38 $this->subject = $this->getAccessibleMock(TypolinkViewHelper::class, array(
'renderChildren'));
49 $this->subject->expects($this->any())->method(
'renderChildren')->will($this->returnValue(
'innerContent'));
50 $contentObjectRendererMock = $this->getMock(ContentObjectRenderer::class, array(), array(),
'',
false);
51 $contentObjectRendererMock->expects($this->once())->method(
'stdWrap')->will($this->returnValue(
'foo'));
53 $this->assertEquals(
'foo', $this->subject->render(
'42'));
62 'empty input' => array(
70 'simple id input' => array(
78 'external url with target' => array(
86 'page with extended class' => array(
92 '42 - "css-class fluid_class"',
94 'page with overridden title' => array(
95 '42 - - "a link title"',
100 '42 - - "another link title"',
102 'page with title and extended parameters' => array(
103 '42 - - "a link title" &x=y',
108 '42 - - "a link title" &x=y&a=b',
110 'page with complex title and extended parameters' => array(
111 '42 - - "a \\"link\\" title with \\\\" &x=y',
116 '42 - - "a \\"link\\" title with \\\\" &x=y&a=b',
118 'full parameter usage' => array(
119 '19 _blank css-class "testtitle with whitespace" &X=y',
124 '19 - "css-class fluid_class" "a new title" &X=y&a=b',
126 'only page id and overwrite' => array(
149 $result = $this->subject->_call(
'createTypolinkParameterArrayFromArguments', $input, $targetFromFluid, $classFromFluid, $titleFromFluid, $additionalParametersFromFluid);
150 $this->assertSame($expected, $result);