Skip to content

Commit bfc23e5

Browse files
Merge branch '7.4' into 8.0
* 7.4: replace PHPUnit annotations with attributes
2 parents 0dd1b9e + 3336688 commit bfc23e5

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Tests/Transport/BeanstalkdReceiverTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Messenger\Bridge\Beanstalkd\Tests\Transport;
1313

14+
use PHPUnit\Framework\Attributes\DataProvider;
1415
use PHPUnit\Framework\TestCase;
1516
use Symfony\Component\Messenger\Bridge\Beanstalkd\Tests\Fixtures\DummyMessage;
1617
use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdPriorityStamp;
@@ -90,9 +91,7 @@ public function testItRejectTheMessageIfThereIsAMessageDecodingFailedException()
9091
$receiver->get();
9192
}
9293

93-
/**
94-
* @dataProvider provideRejectCases
95-
*/
94+
#[DataProvider('provideRejectCases')]
9695
public function testReject(array $stamps, ?int $priority, bool $forceDelete)
9796
{
9897
$serializer = $this->createSerializer();

Tests/Transport/ConnectionTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
use Pheanstalk\Values\TubeList;
2828
use Pheanstalk\Values\TubeName;
2929
use Pheanstalk\Values\TubeStats;
30+
use PHPUnit\Framework\Attributes\TestWith;
3031
use PHPUnit\Framework\TestCase;
3132
use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\Connection;
3233
use Symfony\Component\Messenger\Exception\InvalidArgumentException as MessengerInvalidArgumentException;
@@ -266,11 +267,9 @@ public function testAckWhenABeanstalkdExceptionOccurs()
266267
$connection->ack($id);
267268
}
268269

269-
/**
270-
* @testWith [false, false]
271-
* [false, true]
272-
* [true, true]
273-
*/
270+
#[TestWith([false, false])]
271+
#[TestWith([false, true])]
272+
#[TestWith([true, true])]
274273
public function testReject(bool $buryOnReject, bool $forceDelete)
275274
{
276275
$id = '123456';

0 commit comments

Comments
 (0)