diff options
Diffstat (limited to 'tests/lib/AppFramework/Middleware')
3 files changed, 17 insertions, 17 deletions
diff --git a/tests/lib/AppFramework/Middleware/CompressionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/CompressionMiddlewareTest.php index 3eeac3ef103..5dd13942097 100644 --- a/tests/lib/AppFramework/Middleware/CompressionMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/CompressionMiddlewareTest.php @@ -68,7 +68,7 @@ class CompressionMiddlewareTest extends \Test\TestCase { ->willReturn(Http::STATUS_OK); $this->middleWare->beforeController($this->controller, 'myMethod'); - $this->middleWare->afterController($this->controller,'myMethod', $response); + $this->middleWare->afterController($this->controller, 'myMethod', $response); $output = 'myoutput'; $result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output); @@ -90,7 +90,7 @@ class CompressionMiddlewareTest extends \Test\TestCase { ->willReturn(Http::STATUS_OK); $this->middleWare->beforeController($this->controller, 'myMethod'); - $this->middleWare->afterController($this->controller,'myMethod', $response); + $this->middleWare->afterController($this->controller, 'myMethod', $response); $output = 'myoutput'; $result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output); @@ -112,7 +112,7 @@ class CompressionMiddlewareTest extends \Test\TestCase { ->willReturn(Http::STATUS_OK); $this->middleWare->beforeController($this->controller, 'myMethod'); - $this->middleWare->afterController($this->controller,'myMethod', $response); + $this->middleWare->afterController($this->controller, 'myMethod', $response); $output = 'myoutput'; $result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output); @@ -132,7 +132,7 @@ class CompressionMiddlewareTest extends \Test\TestCase { $response->method('getStatus') ->willReturn(Http::STATUS_OK); $this->middleWare->beforeController($this->controller, 'myMethod'); - $this->middleWare->afterController($this->controller,'myMethod', $response); + $this->middleWare->afterController($this->controller, 'myMethod', $response); $output = 'myoutput'; $result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output); @@ -153,7 +153,7 @@ class CompressionMiddlewareTest extends \Test\TestCase { ->willReturn(Http::STATUS_NOT_FOUND); $this->middleWare->beforeController($this->controller, 'myMethod'); - $this->middleWare->afterController($this->controller,'myMethod', $response); + $this->middleWare->afterController($this->controller, 'myMethod', $response); $output = 'myoutput'; $result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output); diff --git a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php index 786bac6d856..cc04992ae18 100644 --- a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php @@ -135,7 +135,7 @@ class BruteForceMiddlewareTest extends TestCase { /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); - $this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response); + $this->bruteForceMiddleware->afterController($controller, 'testMethod', $response); } public function testAfterControllerWithAnnotationAndNotThrottledRequest() { @@ -165,7 +165,7 @@ class BruteForceMiddlewareTest extends TestCase { /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); - $this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response); + $this->bruteForceMiddleware->afterController($controller, 'testMethod', $response); } public function testAfterControllerWithoutAnnotation() { @@ -188,6 +188,6 @@ class BruteForceMiddlewareTest extends TestCase { $controller = $this->createMock(Controller::class); /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */ $response = $this->createMock(Response::class); - $this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response); + $this->bruteForceMiddleware->afterController($controller, 'testMethod', $response); } } diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index bf84a631f74..1af2b2b9f1c 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -446,7 +446,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @SubAdminRequired */ public function testIsNotSubAdminCheck() { - $this->reader->reflect(__CLASS__,__FUNCTION__); + $this->reader->reflect(__CLASS__, __FUNCTION__); $sec = $this->getMiddleware(true, false, false); $this->expectException(SecurityException::class); @@ -458,7 +458,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @SubAdminRequired */ public function testIsSubAdminCheck() { - $this->reader->reflect(__CLASS__,__FUNCTION__); + $this->reader->reflect(__CLASS__, __FUNCTION__); $sec = $this->getMiddleware(true, false, true); $sec->beforeController($this, __METHOD__); @@ -470,7 +470,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { * @SubAdminRequired */ public function testIsSubAdminAndAdminCheck() { - $this->reader->reflect(__CLASS__,__FUNCTION__); + $this->reader->reflect(__CLASS__, __FUNCTION__); $sec = $this->getMiddleware(true, true, true); $sec->beforeController($this, __METHOD__); @@ -523,7 +523,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { new NotLoggedInException() ); $expected = new RedirectResponse('http://localhost/nextcloud/index.php/login?redirect_url=nextcloud/index.php/apps/specialapp'); - $this->assertEquals($expected , $response); + $this->assertEquals($expected, $response); } public function testAfterExceptionRedirectsToWebRootAfterStrictCookieFail() { @@ -546,7 +546,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { ); $expected = new RedirectResponse(\OC::$WEBROOT . '/'); - $this->assertEquals($expected , $response); + $this->assertEquals($expected, $response); } @@ -594,7 +594,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { ); $expected = new TemplateResponse('core', '403', ['message' => $exception->getMessage()], 'guest'); $expected->setStatus($exception->getCode()); - $this->assertEquals($expected , $response); + $this->assertEquals($expected, $response); } public function testAfterAjaxExceptionReturnsJSONError() { @@ -624,7 +624,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { */ public function testRestrictedAppLoggedInPublicPage() { $middleware = $this->getMiddleware(true, false, false); - $this->reader->reflect(__CLASS__,__FUNCTION__); + $this->reader->reflect(__CLASS__, __FUNCTION__); $this->appManager->method('getAppPath') ->with('files') @@ -645,7 +645,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { */ public function testRestrictedAppNotLoggedInPublicPage() { $middleware = $this->getMiddleware(false, false, false); - $this->reader->reflect(__CLASS__,__FUNCTION__); + $this->reader->reflect(__CLASS__, __FUNCTION__); $this->appManager->method('getAppPath') ->with('files') @@ -665,7 +665,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { */ public function testRestrictedAppLoggedIn() { $middleware = $this->getMiddleware(true, false, false, false); - $this->reader->reflect(__CLASS__,__FUNCTION__); + $this->reader->reflect(__CLASS__, __FUNCTION__); $this->appManager->method('getAppPath') ->with('files') |