Skip to content

Commit 40542d4

Browse files
committed
Replace annotations
1 parent 2f22626 commit 40542d4

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

tests/DependencyInjection/Compiler/ConfigureHttpFactoriesCompilerPassTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use BabDev\WebSocketBundle\DependencyInjection\Compiler\ConfigureHttpFactoriesCompilerPass;
66
use GuzzleHttp\Psr7\HttpFactory;
77
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase;
8+
use PHPUnit\Framework\Attributes\TestDox;
89
use Psr\Http\Message\ResponseFactoryInterface;
910
use Ratchet\RFC6455\Handshake\RequestVerifier;
1011
use Ratchet\RFC6455\Handshake\ServerNegotiator;
@@ -15,9 +16,7 @@
1516

1617
final class ConfigureHttpFactoriesCompilerPassTest extends AbstractCompilerPassTestCase
1718
{
18-
/**
19-
* @testdox Uses the PSR-17 factory defined by the application
20-
*/
19+
#[TestDox('Uses the PSR-17 factory defined by the application')]
2120
public function testUsesThePsr17FactoryDefinedByTheApplication(): void
2221
{
2322
$this->container->register('babdev_websocket_server.rfc6455.server_negotiator', ServerNegotiator::class)

tests/Server/Middleware/AuthenticateUserTest.php

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use BabDev\WebSocketBundle\Authentication\Authenticator;
99
use BabDev\WebSocketBundle\Authentication\Storage\TokenStorage;
1010
use BabDev\WebSocketBundle\Server\Middleware\AuthenticateUser;
11+
use PHPUnit\Framework\Attributes\TestDox;
1112
use PHPUnit\Framework\MockObject\MockObject;
1213
use PHPUnit\Framework\TestCase;
1314
use 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

Comments
 (0)