summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-12 23:55:42 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-12 23:55:42 +0200
commita130805a04dbefd3154019b94107e8c71f618a28 (patch)
tree207da99fd73bd0649f3aae285c359209e24b47bc /tests
parent8f73e33a8617d92b1cfac7bd1937504af835f004 (diff)
remove failing jsonresponse from tests, this will be transformed into arrays anyways when port to oc7 happens
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/controller/ApiControllerTest.php4
-rw-r--r--tests/unit/controller/ExportControllerTest.php2
-rw-r--r--tests/unit/controller/FeedApiControllerTest.php4
-rw-r--r--tests/unit/controller/FeedControllerTest.php24
-rw-r--r--tests/unit/controller/FolderControllerTest.php18
5 files changed, 0 insertions, 52 deletions
diff --git a/tests/unit/controller/ApiControllerTest.php b/tests/unit/controller/ApiControllerTest.php
index 6f4dd1e05..ec914a960 100644
--- a/tests/unit/controller/ApiControllerTest.php
+++ b/tests/unit/controller/ApiControllerTest.php
@@ -14,8 +14,6 @@
namespace OCA\News\Controller;
use \OCP\IRequest;
-use \OCP\AppFramework\Http\JSONResponse;
-
use \OCA\News\Utility\ControllerTestUtility;
@@ -87,7 +85,6 @@ class ApiControllerTest extends ControllerTestUtility {
$this->updater->expects($this->once())
->method('beforeUpdate');
$response = $this->newsAPI->beforeUpdate();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -95,7 +92,6 @@ class ApiControllerTest extends ControllerTestUtility {
$this->updater->expects($this->once())
->method('afterUpdate');
$response = $this->newsAPI->afterUpdate();
- $this->assertTrue($response instanceof JSONResponse);
}
diff --git a/tests/unit/controller/ExportControllerTest.php b/tests/unit/controller/ExportControllerTest.php
index 2fbd8d272..820784d18 100644
--- a/tests/unit/controller/ExportControllerTest.php
+++ b/tests/unit/controller/ExportControllerTest.php
@@ -15,7 +15,6 @@ namespace OCA\News\Controller;
use \OCP\IRequest;
use \OCP\AppFramework\Http;
-use \OCP\AppFramework\Http\JSONResponse;
use \OCA\News\Http\TextDownloadResponse;
use \OCA\News\Utility\ControllerTestUtility;
@@ -127,7 +126,6 @@ class ExportControllerTest extends ControllerTestUtility {
$return = $this->controller->articles();
$headers = $return->getHeaders();
- $this->assertTrue($return instanceof JSONResponse);
$this->assertEquals('attachment; filename="articles.json"', $headers ['Content-Disposition']);
$this->assertEquals('[{"guid":null,"url":null,"title":null,' .
diff --git a/tests/unit/controller/FeedApiControllerTest.php b/tests/unit/controller/FeedApiControllerTest.php
index 7beeda87e..54f7a4c0a 100644
--- a/tests/unit/controller/FeedApiControllerTest.php
+++ b/tests/unit/controller/FeedApiControllerTest.php
@@ -15,7 +15,6 @@ namespace OCA\News\Controller;
use \OCP\IRequest;
use \OCP\AppFramework\Http;
-use \OCP\AppFramework\Http\JSONResponse;
use \OCA\News\Utility\ControllerTestUtility;
use \OCA\News\BusinessLayer\BusinessLayerException;
@@ -469,7 +468,6 @@ class FeedApiControllerTest extends ControllerTestUtility {
->method('findAllFromAllUsers')
->will($this->returnValue($feeds));
$response = $this->feedAPI->fromAllUsers();
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals('{"feeds":[{"id":1,"userId":"john"}]}', $response->render());
}
@@ -495,7 +493,6 @@ class FeedApiControllerTest extends ControllerTestUtility {
->with($this->equalTo($feedId), $this->equalTo($userId));
$response = $this->feedAPI->update();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -510,7 +507,6 @@ class FeedApiControllerTest extends ControllerTestUtility {
$response = $this->feedAPI->update();
- $this->assertTrue($response instanceof JSONResponse);
}
diff --git a/tests/unit/controller/FeedControllerTest.php b/tests/unit/controller/FeedControllerTest.php
index f4f22f108..66699cc9e 100644
--- a/tests/unit/controller/FeedControllerTest.php
+++ b/tests/unit/controller/FeedControllerTest.php
@@ -15,7 +15,6 @@ namespace OCA\News\Controller;
use \OCP\IRequest;
use \OCP\AppFramework\Http;
-use \OCP\AppFramework\Http\JSONResponse;
use \OCA\News\Utility\ControllerTestUtility;
use \OCA\News\Db\Feed;
@@ -153,7 +152,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->index();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -181,7 +179,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->index();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -217,7 +214,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->active();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -241,7 +237,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->active();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -265,7 +260,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->active();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -284,7 +278,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->active();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -317,7 +310,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->create();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -350,7 +342,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->create();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -368,7 +359,6 @@ class FeedControllerTest extends ControllerTestUtility {
$params = json_decode($response->render(), true);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_UNPROCESSABLE_ENTITY);
}
@@ -387,7 +377,6 @@ class FeedControllerTest extends ControllerTestUtility {
$params = json_decode($response->render(), true);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_CONFLICT);
}
@@ -403,7 +392,6 @@ class FeedControllerTest extends ControllerTestUtility {
->with($this->equalTo($url['feedId']));
$response = $this->controller->delete();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -422,7 +410,6 @@ class FeedControllerTest extends ControllerTestUtility {
$params = json_decode($response->render(), true);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
}
@@ -453,7 +440,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->update();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -472,7 +458,6 @@ class FeedControllerTest extends ControllerTestUtility {
$render = $response->render();
$this->assertEquals('{"msg":"NO!"}', $render);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
}
@@ -494,7 +479,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->move();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -516,7 +500,6 @@ class FeedControllerTest extends ControllerTestUtility {
$params = json_decode($response->render(), true);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
}
@@ -538,7 +521,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->rename();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -565,7 +547,6 @@ class FeedControllerTest extends ControllerTestUtility {
$params = $response->getData();
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
}
@@ -590,7 +571,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->import();
$this->assertEquals($expected, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -610,7 +590,6 @@ class FeedControllerTest extends ControllerTestUtility {
$response = $this->controller->import();
$this->assertEquals($expected, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -636,7 +615,6 @@ class FeedControllerTest extends ControllerTestUtility {
->with($url['feedId'], $post['highestItemId'], $this->user);
$response = $this->controller->read();
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($expected, $response->getData());
}
@@ -652,7 +630,6 @@ class FeedControllerTest extends ControllerTestUtility {
->with($this->equalTo($url['feedId']));
$response = $this->controller->restore();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -671,7 +648,6 @@ class FeedControllerTest extends ControllerTestUtility {
$params = json_decode($response->render(), true);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
}
diff --git a/tests/unit/controller/FolderControllerTest.php b/tests/unit/controller/FolderControllerTest.php
index 04345aa84..50c547f9a 100644
--- a/tests/unit/controller/FolderControllerTest.php
+++ b/tests/unit/controller/FolderControllerTest.php
@@ -15,7 +15,6 @@ namespace OCA\News\Controller;
use \OCP\IRequest;
use \OCP\AppFramework\Http;
-use \OCP\AppFramework\Http\JSONResponse;
use \OCA\News\Utility\ControllerTestUtility;
use \OCA\News\Db\Folder;
@@ -136,7 +135,6 @@ class FolderControllerTest extends ControllerTestUtility {
'folders' => $return
);
$this->assertEquals($expected, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -151,7 +149,6 @@ class FolderControllerTest extends ControllerTestUtility {
$response = $this->controller->open();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -168,7 +165,6 @@ class FolderControllerTest extends ControllerTestUtility {
$params = json_decode($response->render(), true);
$this->assertEquals($this->msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
}
@@ -184,7 +180,6 @@ class FolderControllerTest extends ControllerTestUtility {
$response = $this->controller->collapse();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -201,7 +196,6 @@ class FolderControllerTest extends ControllerTestUtility {
$params = json_decode($response->render(), true);
$this->assertEquals($this->msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
}
@@ -225,7 +219,6 @@ class FolderControllerTest extends ControllerTestUtility {
$response = $this->controller->create();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -244,7 +237,6 @@ class FolderControllerTest extends ControllerTestUtility {
$this->assertEquals($response->getStatus(), Http::STATUS_UNPROCESSABLE_ENTITY);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -263,7 +255,6 @@ class FolderControllerTest extends ControllerTestUtility {
$this->assertEquals($response->getStatus(), Http::STATUS_CONFLICT);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -278,7 +269,6 @@ class FolderControllerTest extends ControllerTestUtility {
$response = $this->controller->delete();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -295,7 +285,6 @@ class FolderControllerTest extends ControllerTestUtility {
$params = json_decode($response->render(), true);
$this->assertEquals($this->msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
}
@@ -318,7 +307,6 @@ class FolderControllerTest extends ControllerTestUtility {
$response = $this->controller->rename();
$this->assertEquals($result, $response->getData());
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -334,7 +322,6 @@ class FolderControllerTest extends ControllerTestUtility {
$this->assertEquals($response->getStatus(), Http::STATUS_UNPROCESSABLE_ENTITY);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -350,7 +337,6 @@ class FolderControllerTest extends ControllerTestUtility {
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -366,7 +352,6 @@ class FolderControllerTest extends ControllerTestUtility {
$this->assertEquals($response->getStatus(), Http::STATUS_CONFLICT);
$this->assertEquals($msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -395,7 +380,6 @@ class FolderControllerTest extends ControllerTestUtility {
->will($this->returnValue(array($feed)));
$response = $this->controller->read();
- $this->assertTrue($response instanceof JSONResponse);
$this->assertEquals($expected, $response->getData());
}
@@ -411,7 +395,6 @@ class FolderControllerTest extends ControllerTestUtility {
$response = $this->controller->restore();
- $this->assertTrue($response instanceof JSONResponse);
}
@@ -429,7 +412,6 @@ class FolderControllerTest extends ControllerTestUtility {
$this->assertEquals($response->getStatus(), Http::STATUS_NOT_FOUND);
$this->assertEquals($this->msg, $params['msg']);
- $this->assertTrue($response instanceof JSONResponse);
}
} \ No newline at end of file