Example #1
0
 function testBoundarySets()
 {
     $response = $this->represent->boundarySets();
     $isJson = $this->isJson($response);
     $this->assertTrue($isJson, 'Failed: boundaries() not returning JSON');
     $decoded = json_decode($response, true);
     $this->assertArrayHasKey(0, $decoded);
     $this->assertArrayHasKey('domain', $decoded[0]);
     $this->assertArrayHasKey('name', $decoded[0]);
 }
Example #2
0
 public function testBoundarySets()
 {
     $response = $this->represent->boundarySets();
     $isJson = self::isJson($response);
     $this->assertTrue($isJson, 'Failed: boundarySets() not returning JSON');
     $response = $this->represent->boundarySets('federal-electoral-districts');
     $isJson = self::isJson($response);
     $this->assertTrue($isJson, "Failed: boundarySets('federal-electoral-districts') not returning JSON");
     $response = $this->represent->boundarySets(null, ['domain' => 'Canada']);
     $isJson = self::isJson($response);
     $this->assertTrue($isJson, "Failed: boundarySets(null, params) not returning JSON");
 }