public function renderCorrectlyConvertsIntoPlaintext($source, $expectedResult) { $this->viewHelper->expects($this->once())->method('buildRenderChildrenClosure')->willReturn(function () { throw new \Exception('rendderChildrenClosure was invoked but should not have been'); }); $this->viewHelper->setArguments(['value' => $source]); $actualResult = $this->viewHelper->render(); $this->assertSame($expectedResult, $actualResult); }