File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 9
9
10
10
namespace TheWebSolver \Codegarage \Lib ;
11
11
12
+ use LogicException ;
12
13
use MiddlewareAdapter ;
13
14
use PHPUnit \Framework \TestCase ;
14
15
use TheWebSolver \Codegarage \Lib \PipelineBridge ;
@@ -63,5 +64,15 @@ public function process(
63
64
};
64
65
65
66
$ this ->assertSame ( expected: 350 , actual: $ handler ->handle ( $ request )->getStatusCode () );
67
+
68
+ PipelineBridge::resetMiddlewareAdapter ();
69
+
70
+ // Must always throw exception if core PSR-15 implementation not used.
71
+ if ( ! interface_exists ( '\\Psr \\Http \\Server \\MiddlewareInterface ' ) ) {
72
+ $ this ->expectException ( LogicException::class );
73
+ $ this ->expectExceptionMessage ( 'Cannot find implementation of PSR15 HTTP Server Middleware. ' );
74
+
75
+ PipelineBridge::toMiddleware ( middleware: '' );
76
+ }
66
77
}
67
78
}
You can’t perform that action at this time.
0 commit comments