diff --git a/tests/JsonRpc/ResponseCollectionTest.php b/tests/JsonRpc/ResponseCollectionTest.php index 7222ed7f..c2333e43 100644 --- a/tests/JsonRpc/ResponseCollectionTest.php +++ b/tests/JsonRpc/ResponseCollectionTest.php @@ -58,4 +58,20 @@ public function it_iterates_and_accesses_correctly() $this->assertNull($responseCollection->getResponse('unknown id')); } + + /** + * @test + */ + public function it_iterates_and_accesses_correctly_without_results() + { + $responseCollection = new JsonRpcResponseCollection(); + + $this->assertCount(0, $responseCollection); + $this->assertFalse($responseCollection->hasResponse('unknown id')); + $this->assertNull($responseCollection->getResponse('unknown id')); + + foreach ($responseCollection as $response) { + $this->assertFalse(true); + } + } }