Changeset b858e6f for src/webservice/tests/StationsTest.php
- Timestamp:
- Aug 28, 2015, 3:59:07 PM (11 years ago)
- Branches:
- master
- Children:
- 552da81
- Parents:
- 1e37648
- File:
-
- 1 edited
-
src/webservice/tests/StationsTest.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/webservice/tests/StationsTest.php
r1e37648 rb858e6f 52 52 } 53 53 54 public function testRegisterStation() 55 { 56 $baseUrl = $this->_webserviceConfig->webserviceBaseUrl(); 57 $this->assertInternalType('string', $baseUrl, "baseUrl is not of type string: ". $baseUrl); 58 $this->assertTrue(!empty($baseUrl), "baseUrl is empty: ". $baseUrl); 59 $client = new GuzzleHttp\Client 60 ( 61 [ 62 "base_uri" => $baseUrl, 63 "timeout" => 2.0, 64 "http_errors" => false, 65 ] 66 ); 67 $response = $client->post("index.php/stations/register", 68 [ "json" => ["name" => "Cool Station", "longitude" => 23.2, "latitude" => 90, "city" => "Krefeld"]] 69 ); 70 echo $response->getStatusCode(); 71 echo $response->getBody(); 72 } 73 54 74 protected function query($url){ 55 75 $baseUrl = $this->_webserviceConfig->webserviceBaseUrl();
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/siweather/chrome/site/your_project_logo.png)