Skip to content

Commit 50345c4

Browse files
authored
Merge pull request #59 from Jean85/allow-phpunit-11
Allow PHPUnit 11
2 parents 2d1a968 + ae95f1a commit 50345c4

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ jobs:
6363
run: composer install --ansi --no-interaction --no-progress
6464

6565
- name: Execute Unit Tests
66-
run: vendor/bin/phpunit --coverage-text
66+
run: vendor/bin/phpunit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"require": {
1515
"php": "^7.3 || ^8",
1616
"phpspec/prophecy": "^1.18",
17-
"phpunit/phpunit":"^9.1 || ^10.1"
17+
"phpunit/phpunit":"^9.1 || ^10.1 || ^11.0"
1818
},
1919
"autoload": {
2020
"psr-4": {

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)