Example #1
0
 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");
 }
Example #2
0
 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);
 }