/** * @test */ public function it_gets_a_country_collection() { $wps = new Sdk(); $wps->addMockResults([new Response(200, [], json_encode($wps->countriesResponse()))]); $countries = $wps->country()->all(); $this->assertEquals(['/countries/'], $wps->getRequestUris()); $this->assertInstanceOf(Illuminate\Support\Collection::class, $countries); $this->assertContainsOnlyInstancesOf(Country::class, $countries); $this->assertEquals([1, 2], [$countries[0]->id, $countries[1]->id]); }