public function testMenuUpdate() { $menu_update = new MenuUpdate(); $menu_update->getMenuStatus(); $expected_response = json_encode(array("menuUpdated" => true)); $returned_response = $menu_update->encodeResponse(); $this->assertEquals($expected_response, $returned_response); }
public function actionMenuUpdate() { $model = new MenuUpdate(); $model->getMenuStatus(); $encode_response = $model->encodeResponse(); HttpResponse::status(200); HttpResponse::setContentType('application/json'); HttpResponse::setData($encode_response); HttpResponse::send(); }