diff --git a/composer.json b/composer.json index 6cc6cca..adce696 100644 --- a/composer.json +++ b/composer.json @@ -13,9 +13,13 @@ "email": "enumag@gmail.com" } ], + "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": { diff --git a/src/Module/Mockery.php b/src/Module/Mockery.php index 86702bb..4875d34 100644 --- a/src/Module/Mockery.php +++ b/src/Module/Mockery.php @@ -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. @@ -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(); @@ -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; }