Closed dingo-d closed 3 years ago
@dingo-d I have just seen that and missed the notification completely...
I will look into this next.
@dingo-d I'm looking into this: what PHPUnit version was installed?
The PHPUnit version was 9.5.1. It's not a priority now, but I never saw this issue, and on other projects, it worked fine. So it was a bit odd 🤷🏼♂️
Closing this as I could not reproduce locally and could not track down the issue source.
Yeah, it could have been a fluke on the project 🤷🏼♂️ Thanks for the help 👍🏼
Note: https://github.com/sebastianbergmann/phpunit/commit/68582043e149039cfa3596b42ed35753dcf54fb2
getAnnotations()
was removed from phpunit9.
It was tagged:
@internal This method is not covered by the backward compatibility promise for PHPUnit
So, sadly, it "just broke". You need to change to code like:
use PHPUnit\Util\Test as TestUtil;
$annotations = TestUtil::parseTestMethodAnnotations(
static::class,
$this->name
);
But still, that TestUtil
class is tagged:
@internal This class is not covered by the backward compatibility promise for PHPUnit
So it could still change at any moment.
I was getting the same error, in my case the solution was to modify wpRootFolder: "%WP_ROOT_FOLDER%"
in wpunit.suite.yml
with a correct value because recently a canged the unit from E
to C
and updated composer vendor with latest packages, a better solution for me is to set WP_ROOT_FOLDER="../../../"
to have a relative path and not absolute one.
(3 hours of debugging only for a fu****g single letter 😅)
Environment OS: MacOS 11.1 PHP version: 7.4.13 Installed Codeception version: 4.1.15 Installed wp-browser version: 2.6.17 WordPress version: 5.6
Local development environment: Laravel Valet WordPress structure and management: default
Can you perform the test manually? The feature I'm testing works when running from browser.
Codeception configuration file
Suite configuration file Paste, in a fenced YAML block, the content of the suite configuration file; remove any sensitive data!
Describe the bug When running integration tests i get the
Pointing to the
parent::setUp()
method.Test looks like this:
Expected behavior Test should pass. Same test, on a different project worked. Maybe something broke in the latest versions of PHPUnit/Codeception?