File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
namespace MezzioTest \Authentication \OAuth2 ;
6
6
7
+ use Laminas \Diactoros \ServerRequest ;
7
8
use League \Event \ListenerInterface ;
8
9
use League \Event \ListenerProviderInterface ;
9
10
use League \OAuth2 \Server \AuthorizationServer ;
@@ -133,6 +134,10 @@ static function (RequestEvent $event): void {
133
134
$ result = $ factory ($ mockContainer );
134
135
135
136
self ::assertInstanceOf (AuthorizationServer::class, $ result );
137
+
138
+ // Ensure listeners have been registered correctly. If they have not, then emitting an event will fail
139
+ $ request = $ this ->createMock (ServerRequest::class);
140
+ $ result ->getEmitter ()->emit (new RequestEvent (RequestEvent::CLIENT_AUTHENTICATION_FAILED , $ request ));
136
141
}
137
142
138
143
public function testInvokeWithListenerConfigMissingServiceThrowsException (): void
You can’t perform that action at this time.
0 commit comments