88use BabDev \WebSocketBundle \Authentication \Authenticator ;
99use BabDev \WebSocketBundle \Authentication \Storage \TokenStorage ;
1010use BabDev \WebSocketBundle \Server \Middleware \AuthenticateUser ;
11+ use PHPUnit \Framework \Attributes \TestDox ;
1112use PHPUnit \Framework \MockObject \MockObject ;
1213use PHPUnit \Framework \TestCase ;
1314use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
@@ -31,9 +32,7 @@ protected function setUp(): void
3132 $ this ->middleware = new AuthenticateUser ($ this ->decoratedMiddleware , $ this ->authenticator , $ this ->tokenStorage );
3233 }
3334
34- /**
35- * @testdox Handles a new connection being opened
36- */
35+ #[TestDox('Handles a new connection being opened ' )]
3736 public function testOnOpen (): void
3837 {
3938 /** @var MockObject&Connection $connection */
@@ -50,9 +49,7 @@ public function testOnOpen(): void
5049 $ this ->middleware ->onOpen ($ connection );
5150 }
5251
53- /**
54- * @testdox Handles incoming data on the connection
55- */
52+ #[TestDox('Handles incoming data on the connection ' )]
5653 public function testOnMessage (): void
5754 {
5855 $ data = 'Testing ' ;
@@ -67,9 +64,7 @@ public function testOnMessage(): void
6764 $ this ->middleware ->onMessage ($ connection , $ data );
6865 }
6966
70- /**
71- * @testdox Closes the connection
72- */
67+ #[TestDox('Closes the connection ' )]
7368 public function testOnClose (): void
7469 {
7570 /** @var MockObject&AttributeStore $attributeStore */
@@ -110,9 +105,7 @@ public function testOnClose(): void
110105 $ this ->middleware ->onClose ($ connection );
111106 }
112107
113- /**
114- * @testdox Handles an error
115- */
108+ #[TestDox('Handles an error ' )]
116109 public function testOnError (): void
117110 {
118111 /** @var MockObject&Connection $connection */
0 commit comments