drupal testing

Deprecation fails when testing Drupal 8

Submitted by timmillwood on Mon, 26/02/2018 - 08:57

With each release of Drupal 8 more and more things are being deprecated, which is awesome. It shows innovation, forward thinking, and a thought for backwards compatibility. However throwing notices or warnings when deprecated code is used can cause tests to fail. We already counter this a little by adding <env name="SYMFONY_DEPRECATIONS_HELPER" value="weak_vendors"> to phpunit.xml.dist in core.

To quote the Symfony documentation: