public function testGet()
 {
     $this->curl = new CURL(self::URL);
     $this->curl->doGet();
     $result = $this->curl->getResult();
     $this->assertEquals('Controller\\TestController::listAll', $result->message->method);
     $this->assertNull($result->data);
     $this->assertEquals('GET', $result->message->server->REQUEST_METHOD);
 }
Esempio n. 2
0
 public function testConnection()
 {
     $this->curl->doGet();
     $result = $this->curl->getResult();
     $info = $this->curl->getInfo();
     $this->assertEquals('application/json', $info['content_type']);
     $this->assertEquals(400, $info['http_code']);
     $this->assertEquals(false, $result->success);
     $this->assertEquals(400, $result->statusCode);
     $this->assertEquals(Application::ERROR_WS_NOT_FOUND, $result->message);
 }