Skip to content

Commit

Permalink
fix: add attributes to support PHPUnit 10 + 11 (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickverm committed Mar 5, 2024
1 parent 0a2750c commit d1c4d37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/InteractsWithMessenger.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Zenstruck\Messenger\Test;

use PHPUnit\Framework\Attributes\After;
use PHPUnit\Framework\Attributes\Before;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Zenstruck\Messenger\Test\Bus\TestBus;
use Zenstruck\Messenger\Test\Bus\TestBusRegistry;
Expand All @@ -27,6 +29,7 @@ trait InteractsWithMessenger
*
* @before
*/
#[Before]
final protected static function _initializeTestTransports(): void
{
TestTransport::initialize();
Expand All @@ -37,6 +40,7 @@ final protected static function _initializeTestTransports(): void
*
* @before
*/
#[Before]
final protected static function _enableMessagesCollection(): void
{
TestTransport::enableMessagesCollection();
Expand All @@ -48,6 +52,7 @@ final protected static function _enableMessagesCollection(): void
*
* @after
*/
#[After]
final protected static function _disableMessagesCollection(): void
{
TestTransport::disableMessagesCollection();
Expand All @@ -59,6 +64,7 @@ final protected static function _disableMessagesCollection(): void
*
* @after
*/
#[After]
final protected static function _resetMessengerTransports(): void
{
TestTransport::resetAll();
Expand Down

0 comments on commit d1c4d37

Please sign in to comment.