/** * @test */ public function it_should_retrieve_encoding_notification() { $xml = '<root><item>value</item></root>'; $this->mockParam('route', 'hash', 'hash'); $this->mockParam('post', 'xml', $xml); $this->notifyService->expects($this->once())->method('notify')->with(new \SimpleXMLElement($xml)); $result = $this->controller->notifyAction(); $this->assertEquals($result->getVariable('success'), true); }