summaryrefslogtreecommitdiff
path: root/tests/Unit/Middleware/Stub/ResolvesMiddlewareTraitImplementation.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-08-25 21:16:20 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-08-25 21:48:39 +0200
commita1bc763a16ee8be109de5c9053fbc5eded53824e (patch)
tree7253db0c8ea918e82253bef3926bcba461a7105d /tests/Unit/Middleware/Stub/ResolvesMiddlewareTraitImplementation.php
parent73c9d923e7cc77847cfcbff4b90ad4815699a4fa (diff)
Added nikic/fast-route as routing dispatcher
Diffstat (limited to 'tests/Unit/Middleware/Stub/ResolvesMiddlewareTraitImplementation.php')
-rw-r--r--tests/Unit/Middleware/Stub/ResolvesMiddlewareTraitImplementation.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/Unit/Middleware/Stub/ResolvesMiddlewareTraitImplementation.php b/tests/Unit/Middleware/Stub/ResolvesMiddlewareTraitImplementation.php
new file mode 100644
index 00000000..2787d74b
--- /dev/null
+++ b/tests/Unit/Middleware/Stub/ResolvesMiddlewareTraitImplementation.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace Engelsystem\Test\Unit\Middleware\Stub;
+
+use Engelsystem\Application;
+use Engelsystem\Middleware\ResolvesMiddlewareTrait;
+use InvalidArgumentException;
+use Psr\Http\Server\MiddlewareInterface;
+use Psr\Http\Server\RequestHandlerInterface;
+
+class ResolvesMiddlewareTraitImplementation
+{
+ use ResolvesMiddlewareTrait;
+
+ /** @var Application */
+ protected $container;
+
+ /**
+ * @param Application $container
+ */
+ public function __construct(Application $container = null)
+ {
+ $this->container = $container;
+ }
+
+ /**
+ * @param string|callable|MiddlewareInterface|RequestHandlerInterface $middleware
+ * @return MiddlewareInterface|RequestHandlerInterface
+ * @throws InvalidArgumentException
+ */
+ public function callResolveMiddleware($middleware)
+ {
+ return $this->resolveMiddleware($middleware);
+ }
+}