public function testRenderContentEmbedThrowsException() { $renderer = $this->getMockedRenderer(array('checkContent')); $contentId = 42; $renderer->expects($this->once())->method('checkContent')->with($contentId)->will($this->throwException(new Exception('Something threw up'))); $renderer->renderContentEmbed($contentId, 'embedTest', array('parameters'), true); }