function testPostcode() { $response = $this->represent->postcode('L5G4L3'); $isJson = $this->isJson($response); $this->assertTrue($isJson, 'Failed: boundaries() not returning JSON'); $decoded = json_decode($response, true); $this->assertArrayHasKey('representatives_concordance', $decoded); $this->assertArrayHasKey('boundaries_centroid', $decoded); $this->assertArrayHasKey('representatives_centroid', $decoded); $this->assertArrayHasKey('boundaries_concordance', $decoded); }
public function testPostcode() { $response = $this->represent->postcode('L5G4L3'); $isJson = self::isJson($response); $this->assertTrue($isJson, 'Failed: postcode() not returning JSON'); }