Skip to content

Commit

Permalink
Add attributes below annotations for cross compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean85 committed Feb 6, 2024
1 parent ad1b652 commit 0c0deb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ProphecyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace Prophecy\PhpUnit;

use PHPUnit\Framework\AssertionFailedError;
use PHPUnit\Framework\Attributes\After;
use PHPUnit\Framework\Attributes\PostCondition;
use PHPUnit\Framework\TestCase;
use Prophecy\Exception\Doubler\DoubleException;
use Prophecy\Exception\Doubler\InterfaceNotFoundException;
Expand Down Expand Up @@ -57,6 +59,7 @@ protected function prophesize(?string $classOrInterface = null): ObjectProphecy
/**
* @postCondition
*/
#[PostCondition]
protected function verifyProphecyDoubles(): void
{
if ($this->prophet === null) {
Expand All @@ -75,6 +78,7 @@ protected function verifyProphecyDoubles(): void
/**
* @after
*/
#[After]
protected function tearDownProphecy(): void
{
if (null !== $this->prophet && !$this->prophecyAssertionsCounted) {
Expand Down

0 comments on commit 0c0deb2

Please sign in to comment.