assertFileExists($file); require($file); $this->config = $testconfig; $this->assertNotNull($this->config); } public function testEmptyStations() { $this->queryEmptyStationList($this->config["webserviceUrl"]); } public function testStationRewrite() { $this->queryEmptyStationList($this->config["webserviceUrlRewrite"]); } protected function queryEmptyStationList($url){ $this->assertInternalType('string', $url ."/"); $client = new GuzzleHttp\Client ( [ "base_uri" => $url, "timeout" => 2.0, ] ); $response = $client->get("index.php/stations"); $this->assertNotNull($response); $this->assertEquals($response->getStatusCode(), 200); $this->assertEquals($response->getReasonPhrase(), "OK"); $body = $response->getBody(); $this->assertTrue(!empty($body)); $stations = json_decode($body); $this->assertNotNull($stations); $this->assertInternalType("array", $stations); $this->assertEquals(count($stations), 0); } } ?>