Skip to content

Commit

Permalink
fix: PHPUnit deprecation (#29)
Browse files Browse the repository at this point in the history
> Metadata found in doc-comment for method AppTestClass::_startTestMailer(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.
  • Loading branch information
norkunas authored Aug 15, 2024
1 parent a7bd13d commit 8d75e40
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/InteractsWithMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Zenstruck\Mailer\Test;

use PHPUnit\Framework\Attributes\After;
use PHPUnit\Framework\Attributes\Before;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

/**
Expand All @@ -22,6 +24,7 @@ trait InteractsWithMailer
* @internal
* @before
*/
#[Before]
final protected static function _startTestMailer(): void
{
TestMailer::start();
Expand All @@ -31,6 +34,7 @@ final protected static function _startTestMailer(): void
* @internal
* @after
*/
#[Before]
final protected static function _stopTestMailer(): void
{
TestMailer::stop();
Expand Down

0 comments on commit 8d75e40

Please sign in to comment.