Skip to content

Commit

Permalink
Merge pull request #59 from Jean85/allow-phpunit-11
Browse files Browse the repository at this point in the history
Allow PHPUnit 11
  • Loading branch information
stof committed Feb 7, 2024
2 parents 2d1a968 + ae95f1a commit 50345c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
run: composer install --ansi --no-interaction --no-progress

- name: Execute Unit Tests
run: vendor/bin/phpunit --coverage-text
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"require": {
"php": "^7.3 || ^8",
"phpspec/prophecy": "^1.18",
"phpunit/phpunit":"^9.1 || ^10.1"
"phpunit/phpunit":"^9.1 || ^10.1 || ^11.0"
},
"autoload": {
"psr-4": {
Expand Down
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 50345c4

Please sign in to comment.