| @@ 63-73 (lines=11) @@ | ||
| 60 | assertThat($msgs, is(identicalTo($this->messages))); |
|
| 61 | } |
|
| 62 | ||
| 63 | public function testReceiveWithNoMessages() |
|
| 64 | { |
|
| 65 | $client = new Client(new ArrayAdapter()); |
|
| 66 | ||
| 67 | $msgs = []; |
|
| 68 | $client->receive(function ($msg) use (&$msgs) { |
|
| 69 | $msgs[] = $msg; |
|
| 70 | }, null); |
|
| 71 | ||
| 72 | assertThat($msgs, is(emptyArray())); |
|
| 73 | } |
|
| 74 | ||
| 75 | public function testReceiveWithLimitAndNoMessages() |
|
| 76 | { |
|
| @@ 75-85 (lines=11) @@ | ||
| 72 | assertThat($msgs, is(emptyArray())); |
|
| 73 | } |
|
| 74 | ||
| 75 | public function testReceiveWithLimitAndNoMessages() |
|
| 76 | { |
|
| 77 | $client = new Client(new ArrayAdapter()); |
|
| 78 | ||
| 79 | $msgs = []; |
|
| 80 | $client->receive(function ($msg) use (&$msgs) { |
|
| 81 | $msgs[] = $msg; |
|
| 82 | }, 10); |
|
| 83 | ||
| 84 | assertThat($msgs, is(emptyArray())); |
|
| 85 | } |
|
| 86 | ||
| 87 | public function testSend() |
|
| 88 | { |
|