getJson(route('api.v1.currencies.index')); // Assert $response->assertOk(); $response->assertJsonCount(166); $responseObj = collect($response->json()); $this->assertSame([ 'code' => 'EUR', 'name' => 'Euro', 'symbol' => '€', ], $responseObj->firstWhere('code', '=', 'EUR')); } }