Skip to content

Commit 0c0deb2

Browse files
committed
Add attributes below annotations for cross compatibility
See: * sebastianbergmann/phpunit#5695 * #60 (comment)
1 parent ad1b652 commit 0c0deb2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ProphecyTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Prophecy\PhpUnit;
44

55
use PHPUnit\Framework\AssertionFailedError;
6+
use PHPUnit\Framework\Attributes\After;
7+
use PHPUnit\Framework\Attributes\PostCondition;
68
use PHPUnit\Framework\TestCase;
79
use Prophecy\Exception\Doubler\DoubleException;
810
use Prophecy\Exception\Doubler\InterfaceNotFoundException;
@@ -57,6 +59,7 @@ protected function prophesize(?string $classOrInterface = null): ObjectProphecy
5759
/**
5860
* @postCondition
5961
*/
62+
#[PostCondition]
6063
protected function verifyProphecyDoubles(): void
6164
{
6265
if ($this->prophet === null) {
@@ -75,6 +78,7 @@ protected function verifyProphecyDoubles(): void
7578
/**
7679
* @after
7780
*/
81+
#[After]
7882
protected function tearDownProphecy(): void
7983
{
8084
if (null !== $this->prophet && !$this->prophecyAssertionsCounted) {

0 commit comments

Comments
 (0)