From e45e7b02fab2177847a88ef68135412727f50b7f Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 1 Sep 2017 14:11:39 +0200 Subject: [PATCH] Codeception test updated --- application/controllers/api/v1/Test.php | 28 +++---------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/application/controllers/api/v1/Test.php b/application/controllers/api/v1/Test.php index 1b4dc5c82..fd1896560 100644 --- a/application/controllers/api/v1/Test.php +++ b/application/controllers/api/v1/Test.php @@ -2,8 +2,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); -//require_once APPPATH . '/libraries/REST_Controller.php'; - /** * Testing class for REST calls and authentication */ @@ -16,37 +14,17 @@ class Test extends APIv1_Controller /** * Test HTTP GET method - * It responses whith the HTTP status 200 and prints this JSON string - * {"success":true,"message":"API HTTP GET call test succeed"} - * - * @return void */ public function getTest() { - $payload = [ - 'success' => TRUE, - 'message' => 'API HTTP GET call test succeed', - 'error' => 0 - ]; - $httpstatus = REST_Controller::HTTP_OK; - $this->response($payload, $httpstatus); + $this->response(success('API HTTP GET call test succeed'), REST_Controller::HTTP_OK); } - + /** * Test HTTP POST method - * * It responses whith the HTTP status 200 and prints this JSON string - * {"success":true,"message":"API HTTP POST call test succeed"} - * - * @return void */ public function postTest() { - $payload = [ - 'success' => TRUE, - 'message' => 'API HTTP POST call test succeed', - 'error' => 0 - ]; - $httpstatus = REST_Controller::HTTP_OK; - $this->response($payload, $httpstatus); + $this->response(success('API HTTP POST call test succeed'), REST_Controller::HTTP_OK); } }