public function testRepresentativeSets() { $response = $this->represent->representativeSets(); $isJson = self::isJson($response); $this->assertTrue($isJson, 'Failed: representativeSets() not returning JSON'); $response = $this->represent->representativeSets('ontario-legislature'); $isJson = self::isJson($response); $this->assertTrue($isJson, "Failed: representativeSets('ontario-legislature') not returning JSON"); }
function testRepresentativeSets() { $response = $this->represent->representativeSets('north-dumfries-township-council'); $isJson = $this->isJson($response); $this->assertTrue($isJson, 'Failed: boundaries() not returning JSON'); $decoded = json_decode($response, true); $this->assertArrayHasKey('url', $decoded); $this->assertArrayHasKey('name', $decoded); }