@@ 27-36 (lines=10) @@ | ||
24 | $pushServerMock |
|
25 | ->expects($this->once()) |
|
26 | ->method('send') |
|
27 | ->with($this->callback(function ($message) { |
|
28 | $decodedMessage = unserialize($message); |
|
29 | $serializedEvent = '{"propagation_stopped":false,"id":42,"title":"Unicorns spotted in Alaska","url":"http:\/\/unicorn.com\/articles\/unicorns-spotted-alaska"}'; |
|
30 | ||
31 | return |
|
32 | ArticleCreatedEvent::ARTICLE_CREATED_EVENT === $decodedMessage['name'] && |
|
33 | ArticleCreatedEvent::class === $decodedMessage['class'] && |
|
34 | $serializedEvent === $decodedMessage['event'] |
|
35 | ; |
|
36 | })) |
|
37 | ; |
|
38 | ||
39 | $result = $app->handle(Request::create('/api/articles', Request::METHOD_POST)); |
@@ 26-35 (lines=10) @@ | ||
23 | $pushServerMock |
|
24 | ->expects($this->once()) |
|
25 | ->method('send') |
|
26 | ->with($this->callback(function ($message) { |
|
27 | $decodedMessage = unserialize($message); |
|
28 | $serializedEvent = '{"propagation_stopped":false,"id":42,"title":"title","url":"url"}'; |
|
29 | ||
30 | return |
|
31 | ArticleCreatedEvent::ARTICLE_CREATED_EVENT === $decodedMessage['name'] && |
|
32 | ArticleCreatedEvent::class === $decodedMessage['class'] && |
|
33 | $serializedEvent === $decodedMessage['event'] |
|
34 | ; |
|
35 | })) |
|
36 | ; |
|
37 | ||
38 | $eventSerializerMock |