Example #1
0
	/**
	 * @test
	 */
	public function renderReturnsResultOfContentObjectRenderer() {
		$this->subject->expects($this->any())->method('renderChildren')->will($this->returnValue('innerContent'));
		$contentObjectRendererMock = $this->getMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class, array(), array(), '', FALSE);
		$contentObjectRendererMock->expects($this->once())->method('stdWrap')->will($this->returnValue('foo'));
		GeneralUtility::addInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class, $contentObjectRendererMock);
		$this->assertEquals('foo', $this->subject->render('42'));
	}