Skip to content

Commit

Permalink
Add support for Codeception 5
Browse files Browse the repository at this point in the history
  • Loading branch information
yesdevnull committed Feb 5, 2022
1 parent 404ac17 commit 3fa706c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@
"email": "[email protected]"
}
],
"minimum-stability": "dev",
"require": {
"mockery/mockery": "^0.8|^0.9|^1.0",
"codeception/codeception": "^2.4|^3.0|^4.0"
"codeception/codeception": "^5.0.0-alpha1"
},
"conflict": {
"codeception/codeception": "<5.0"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 4 additions & 3 deletions src/Module/Mockery.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
namespace Codeception\Module;

use Codeception\Module;
use Codeception\TestCase;
use Codeception\TestInterface;
use Exception;

/**
* Integrates [Mockery](https://github.com/padraic/mockery) into Codeception tests.
Expand All @@ -27,7 +28,7 @@ class Mockery extends Module
/** @var bool Run mockery expectations after test or not */
private $assert_mocks = true;

public function _after(TestCase $test)
public function _after(TestInterface $test)
{
if ($this->assert_mocks) {
\Mockery::close();
Expand All @@ -37,7 +38,7 @@ public function _after(TestCase $test)
}
}

public function _failed(TestCase $test, $fail)
public function _failed(TestInterface $test, Exception $fail)
{
$this->assert_mocks = false;
}
Expand Down

0 comments on commit 3fa706c

Please sign in to comment.