From 7faa40dc59738fc4b5bb9dd2121e433e2301c36b Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 13 May 2014 23:13:52 +0200 Subject: fix some tests --- controller/entityapiserializer.php | 8 +++++--- controller/jsonhttperror.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'controller') diff --git a/controller/entityapiserializer.php b/controller/entityapiserializer.php index 6548fe6fd..8bd17ba29 100644 --- a/controller/entityapiserializer.php +++ b/controller/entityapiserializer.php @@ -14,7 +14,7 @@ namespace OCA\News\Controller; use \OCP\AppFramework\Http\IResponseSerializer; -class EntityApiSeralizer implements IResponseSerializer { +class EntityApiSerializer implements IResponseSerializer { public function __construct($level) { @@ -32,12 +32,14 @@ class EntityApiSeralizer implements IResponseSerializer { } $response = array( - $this->level => array(); + $this->level => array() ); foreach($data as $entity) { - $response[$this->level][] = $entity->toAPI() + $response[$this->level][] = $entity->toAPI(); } + + return $response; } diff --git a/controller/jsonhttperror.php b/controller/jsonhttperror.php index dca0cb2f3..b841ba5b5 100644 --- a/controller/jsonhttperror.php +++ b/controller/jsonhttperror.php @@ -23,7 +23,7 @@ trait JSONHttpError { * @param int the http error code * @return \OCP\AppFramework\Http\JSONResponse */ - protected function error($exception, $code) { + public function error($exception, $code) { return new JSONResponse( array('message' => $exception->getMessage()), $code -- cgit v1.2.3