- Issue created by @jErry_jakcson
Despite there are no failing tests, the pipeline is still failing. I can't figure out why just from the logs. Can someone with more knowledge take a look?
- First commit to issue fork.
- 🇵🇱Poland dlevchik Poznan, Poland
Fixed tests for D11. Fixed deprecations, like
Creation of dynamic properties is deprecated
or
Deprecated: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /builds/issue/captcha-3497314/web/core/lib/Drupal/Core/Config/Entity/Query/Condition.php on line 39
This last one is drupal core fault, when saving new config entity on preSave() it tries to load existing entity by uuid in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php line 308. I didn't find the issue for this on drupal core issues. So now we just pre-fill uuid on new CaptchaPoint creation in captcha_set_form_id_setting()
To fix the tests I've added this condition:
// @see https://www.drupal.org/node/2958442 // This is to support "phpunit (previous minor)" $pre_headers_changed = $header === NULL; if ($pre_headers_changed) { $this->assertNull($this->getSession()->getResponseHeader('x-drupal-cache'), 'Cache is disabled'); } else { $this->assertEquals($this->getSession()->getResponseHeader('x-drupal-cache'), 'UNCACHEABLE (response policy)', 'Cache is disabled'); }
This is not ideal, and I believe instead of doing this we may consider to make "phpunit (previous minor)" pipeline optional and allow it to fail, to better support D11. But, considering most of the users are still on D10, this can be done later in the future