summaryrefslogtreecommitdiff
path: root/tests/Unit/Middleware
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-04-24 11:01:37 +0200
committermsquare <msquare@notrademark.de>2019-04-25 18:17:19 +0200
commit79c92da8c14de61dccc015f04c3900aac4bd4179 (patch)
tree7b4e0f51d2bd2508905fdc697b31a73810a1b5d5 /tests/Unit/Middleware
parent7c3a0c70e8d23f47287ead148c6b8682216352c6 (diff)
Formatting
```bash php-cs-fixer fix --allow-risky=yes --rules=@PSR2,psr4,mb_str_functions.php_unit_construct,php_unit_ordered_covers,trailing_comma_in_multiline_array --rules='{"array_syntax": {"syntax":"short"}}' [tests/|src/] ```
Diffstat (limited to 'tests/Unit/Middleware')
-rw-r--r--tests/Unit/Middleware/CallableHandlerTest.php6
-rw-r--r--tests/Unit/Middleware/RequestHandlerTest.php2
-rw-r--r--tests/Unit/Middleware/ResolvesMiddlewareTraitTest.php2
-rw-r--r--tests/Unit/Middleware/RouteDispatcherTest.php2
-rw-r--r--tests/Unit/Middleware/Stub/HasStaticMethod.php4
-rw-r--r--tests/Unit/Middleware/VerifyCsrfTokenTest.php2
6 files changed, 11 insertions, 7 deletions
diff --git a/tests/Unit/Middleware/CallableHandlerTest.php b/tests/Unit/Middleware/CallableHandlerTest.php
index a0dbfce8..d59be60d 100644
--- a/tests/Unit/Middleware/CallableHandlerTest.php
+++ b/tests/Unit/Middleware/CallableHandlerTest.php
@@ -6,6 +6,7 @@ use Engelsystem\Container\Container;
use Engelsystem\Http\Response;
use Engelsystem\Middleware\CallableHandler;
use Engelsystem\Test\Unit\Middleware\Stub\HasStaticMethod;
+use InvalidArgumentException;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ResponseInterface;
@@ -18,7 +19,8 @@ class CallableHandlerTest extends TestCase
public function provideCallable()
{
return [
- [function () { }],
+ [function () {
+ }],
[[$this, 'provideCallable']],
[[HasStaticMethod::class, 'foo']],
];
@@ -113,7 +115,7 @@ class CallableHandlerTest extends TestCase
$this->assertEquals($response, $return);
$middleware = new CallableHandler($callable);
- $this->expectException(\InvalidArgumentException::class);
+ $this->expectException(InvalidArgumentException::class);
$middleware->handle($request);
}
diff --git a/tests/Unit/Middleware/RequestHandlerTest.php b/tests/Unit/Middleware/RequestHandlerTest.php
index 7ff803d0..8b943d71 100644
--- a/tests/Unit/Middleware/RequestHandlerTest.php
+++ b/tests/Unit/Middleware/RequestHandlerTest.php
@@ -136,8 +136,8 @@ class RequestHandlerTest extends TestCase
}
/**
- * @covers \Engelsystem\Middleware\RequestHandler::process
* @covers \Engelsystem\Middleware\RequestHandler::checkPermissions
+ * @covers \Engelsystem\Middleware\RequestHandler::process
*/
public function testCheckPermissions()
{
diff --git a/tests/Unit/Middleware/ResolvesMiddlewareTraitTest.php b/tests/Unit/Middleware/ResolvesMiddlewareTraitTest.php
index 320a6d6b..7cd4d9d3 100644
--- a/tests/Unit/Middleware/ResolvesMiddlewareTraitTest.php
+++ b/tests/Unit/Middleware/ResolvesMiddlewareTraitTest.php
@@ -14,8 +14,8 @@ use Psr\Http\Server\MiddlewareInterface;
class ResolvesMiddlewareTraitTest extends TestCase
{
/**
- * @covers \Engelsystem\Middleware\ResolvesMiddlewareTrait::resolveMiddleware
* @covers \Engelsystem\Middleware\ResolvesMiddlewareTrait::isMiddleware
+ * @covers \Engelsystem\Middleware\ResolvesMiddlewareTrait::resolveMiddleware
*/
public function testResolveMiddleware()
{
diff --git a/tests/Unit/Middleware/RouteDispatcherTest.php b/tests/Unit/Middleware/RouteDispatcherTest.php
index d6ed3408..d35c0f6b 100644
--- a/tests/Unit/Middleware/RouteDispatcherTest.php
+++ b/tests/Unit/Middleware/RouteDispatcherTest.php
@@ -16,8 +16,8 @@ use Psr\Http\Server\RequestHandlerInterface;
class RouteDispatcherTest extends TestCase
{
/**
- * @covers \Engelsystem\Middleware\RouteDispatcher::process
* @covers \Engelsystem\Middleware\RouteDispatcher::__construct
+ * @covers \Engelsystem\Middleware\RouteDispatcher::process
*/
public function testProcess()
{
diff --git a/tests/Unit/Middleware/Stub/HasStaticMethod.php b/tests/Unit/Middleware/Stub/HasStaticMethod.php
index 5ca2670e..329e1248 100644
--- a/tests/Unit/Middleware/Stub/HasStaticMethod.php
+++ b/tests/Unit/Middleware/Stub/HasStaticMethod.php
@@ -4,5 +4,7 @@ namespace Engelsystem\Test\Unit\Middleware\Stub;
class HasStaticMethod
{
- public static function foo() { }
+ public static function foo()
+ {
+ }
}
diff --git a/tests/Unit/Middleware/VerifyCsrfTokenTest.php b/tests/Unit/Middleware/VerifyCsrfTokenTest.php
index 636e1f81..cd593106 100644
--- a/tests/Unit/Middleware/VerifyCsrfTokenTest.php
+++ b/tests/Unit/Middleware/VerifyCsrfTokenTest.php
@@ -14,8 +14,8 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
class VerifyCsrfTokenTest extends TestCase
{
/**
- * @covers \Engelsystem\Middleware\VerifyCsrfToken::process
* @covers \Engelsystem\Middleware\VerifyCsrfToken::isReading
+ * @covers \Engelsystem\Middleware\VerifyCsrfToken::process
*/
public function testProcess()
{