Ignore:
Timestamp:
Sep 9, 2015, 10:03:34 PM (11 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
master
Children:
915dc18
Parents:
d83a844
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/webservice/tests/StationsTest.php

    rd83a844 re498070  
    7777                // sending must failing register request, caused by unproven location
    7878                $response = $client->post("index.php/stations/register",
    79                         [ "json" => ["name" => "Cool Station", "longitude" => 23.2, "latitude" => 90, "city" => "Nice town", "email" => "test@example.org"]]
     79                        [ "json" => ["name" => "Cool Station", "longitude" => 23.2, "latitude" => 90, "city" => "Nice town", "type" => "testing", "email" => "test@example.org"]]
    8080                );
    8181                $this->assertEquals($response->getStatusCode(), 200, $response->getReasonPhrase());
    … …  
    101101
    102102                $response = $client->post("index.php/stations/register",
    103                         [ "json" => ["name" => "My Weather Station", "city" => "Clausthal-Zellerfeld", "longitude" => 10.28152, "latitude" => 51.8281, "email" => "test@example.org"]]
     103                        [ "json" => ["name" => "My Weather Station", "city" => "Clausthal-Zellerfeld", "longitude" => 10.28152, "latitude" => 51.8281, "type" => "testing", "email" => "test@example.org"]]
    104104                );
    105105                $this->assertEquals(200, $response->getStatusCode(), $response->getReasonPhrase());
    106106                $json = json_decode($response->getBody(), true);
    107107                $this->assertTrue(array_key_exists("result", $json));
    108                 $this->assertEquals("success", $json["result"]);
     108                $this->assertEquals("success", $json["result"], $json["message"]);
    109109                $this->assertTrue(array_key_exists("uuid", $json));
    110110                $this->assertTrue(!empty($json["uuid"]));
     111                $this->assertTrue(array_key_exists("message", $json));
     112                $this->assertTrue(!empty($json["message"]));
    111113
    112114                $stations = $this->query("index.php/stations");
Note: See TracChangeset for help on using the changeset viewer.