Closed vinpel closed 6 years ago
It seems to me that this is due to the update of codeception\base to version 2.4.0 When I upgraded to the latest version of this extension, I also broke tests. I decided to install in composer.json
"codeception/base": "~2.3.9"
Tests earned as it should.
Thanks for the info, i will confirm it monday
Still go the error after update. composer update log :
- Removing codeception/phpunit-wrapper (6.0.5)
- Updating behat/gherkin (v4.5.1 => v4.4.5): Downloading (100%)
- Updating symfony/dom-crawler (v3.4.4 => v3.4.6): Downloading (100%)
- Updating symfony/css-selector (v3.4.4 => v3.4.6): Downloading (100%)
- Updating symfony/browser-kit (v3.4.4 => v3.4.6): Downloading (100%)
- Updating symfony/yaml (v3.4.4 => v3.4.6): Downloading (100%)
- Updating symfony/event-dispatcher (v3.4.4 => v3.4.6): Downloading (100%)
- Updating symfony/debug (v3.4.4 => v3.4.6): Downloading (100%)
- Updating symfony/console (v3.4.4 => v3.4.6): Downloading (100%)
- Updating symfony/finder (v3.4.4 => v3.4.6): Downloading (100%)
- Updating codeception/base (2.4.0 => 2.3.9): Downloading (100%)
"codeception/base": "^2.2.3", =>"codeception/base": "~2.3.9",
I do not know if it helps you or not, but here are the setup logs when there is a problem with codeception / base 2.4.0 https://travis-ci.org/Dominus77/yii2-advanced-start/builds/346727948 It was worth changing the version to 2.3.9 the tests passed on ok! https://travis-ci.org/Dominus77/yii2-advanced-start
https://github.com/Codeception/Codeception/pull/4621 https://github.com/Codeception/Codeception/pull/4700
I think these discussions are useful for you.
Does not look like something we can fix in yii. Closing the issue.
What steps will reproduce the problem?
i will explain my event structure : in a bootstrap.php file :
The event file :
i have a file with multiple unit test. If i test a unit file :
But if i launch only the relevant test :
When i launch multiple test it seem to loose the event attached beetween test (if i understand it correcly, the app is not "reset" during each test. My event are attached at bootstrap level but event are detached somewhere)
What is the expected result?
no test failure
What do you get instead?
The test search for a datase entry but the event are not fired => test failule
Additional info