コード例 #1
0
ファイル: APITest.php プロジェクト: seanmcn/php-represent
 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");
 }
コード例 #2
0
ファイル: DocsTest.php プロジェクト: seanmcn/php-represent
 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);
 }