Example #1
0
 public function testMessages()
 {
     $resource = $this->prophesize(Resource::CLASS);
     $resource->addSuccessMessage('success')->shouldBeCalled();
     $resource->addInfoMessage('info')->shouldBeCalled();
     $resource->addWarningMessage('warning')->shouldBeCalled();
     $resource->addErrorMessage('error')->shouldBeCalled();
     $resource->addMessage(MessangerInterface::MESSAGE_INFO, 'custom')->shouldBeCalled();
     $response = new Response($resource->reveal());
     $response->addSuccessMessage('success');
     $response->addInfoMessage('info');
     $response->addWarningMessage('warning');
     $response->addErrorMessage('error');
     $response->addMessage(MessangerInterface::MESSAGE_INFO, 'custom');
 }