diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-13 00:43:54 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-13 00:43:54 +0200 |
commit | 39d1eeb1199b137c9d0f805250d6b73bacf53eb5 (patch) | |
tree | 115741fcc5b8ce7f8524c1b88c66fecb6386ee31 /tests/unit/middleware | |
parent | f116d5a9152ae226a9b7317b6817e5df8e204e9b (diff) |
remove more tests of classes that are now in core
Diffstat (limited to 'tests/unit/middleware')
-rw-r--r-- | tests/unit/middleware/CORSMiddlewareTest.php | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/tests/unit/middleware/CORSMiddlewareTest.php b/tests/unit/middleware/CORSMiddlewareTest.php deleted file mode 100644 index ccc0420ca..000000000 --- a/tests/unit/middleware/CORSMiddlewareTest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php -/** - * ownCloud - News - * - * This file is licensed under the Affero General Public License version 3 or - * later. See the COPYING file. - * - * @author Alessandro Cosentino <cosenal@gmail.com> - * @author Bernhard Posselt <dev@bernhard-posselt.com> - * @copyright Alessandro Cosentino 2012 - * @copyright Bernhard Posselt 2012, 2014 - */ - - -namespace OCA\News\Middleware; - -use OCP\IRequest; -use OCP\AppFramework\Http\Response; - -use OCA\News\Utility\ControllerTestUtility; - -require_once(__DIR__ . "/../../classloader.php"); - - -class CORSMiddlewareTest extends ControllerTestUtility { - - - /** - * @API - */ - public function testSetCORSAPIHeader() { - $request = $this->getRequest( - array('server' => array('HTTP_ORIGIN' => 'test')) - ); - $middleware = new CORSMiddleware($request); - $response = $middleware->afterController('\OCA\News\Middleware\CORSMiddlewareTest', - 'testSetCORSAPIHeader', - new Response()); - $headers = $response->getHeaders(); - - $this->assertEquals('test', $headers['Access-Control-Allow-Origin']); - } - - - public function testNoAPINoCORSHEADER() { - $request = $this->getRequest(); - $middleware = new CORSMiddleware($request); - $response = $middleware->afterController('\OCA\News\Middleware\CORSMiddlewareTest', - 'testNoAPINoCORSHEADER', - new Response()); - $headers = $response->getHeaders(); - $this->assertFalse(array_key_exists('Access-Control-Allow-Origin', $headers)); - } - - - /** - * @API - */ - public function testNoOriginHeaderNoCORSHEADER() { - $request = $this->getRequest(); - $middleware = new CORSMiddleware($request); - $response = $middleware->afterController('\OCA\News\Middleware\CORSMiddlewareTest', - 'testNoOriginHeaderNoCORSHEADER', - new Response()); - $headers = $response->getHeaders(); - $this->assertFalse(array_key_exists('Access-Control-Allow-Origin', $headers)); - } - -} |