drupal-contributions icon indicating copy to clipboard operation
drupal-contributions copied to clipboard

Update XML configuration in phpunit.xml

Open gitressa opened this issue 3 years ago • 0 comments

Problem

When you run a PHPUnit test, you get this warning:

$ lando phpunit web/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php 
PHPUnit 9.5.26 by Sebastian Bergmann and contributors.

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Testing Drupal\Tests\Core\Password\PasswordHashingTest
.........                                                           9 / 9 (100%)

Time: 00:00.027, Memory: 10.00 MB

OK (9 tests, 19 assertions)

Solution

Update the phpunit.xml file:

$ lando phpunit --migrate-configuration
PHPUnit 9.5.26 by Sebastian Bergmann and contributors.

Created backup:         /app/phpunit.xml.bak
Migrated configuration: /app/phpunit.xml

With updated XML configuration

The warning is gone, and the test completes:

$ lando phpunit web/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php
PHPUnit 9.5.26 by Sebastian Bergmann and contributors.

Testing Drupal\Tests\Core\Password\PasswordHashingTest
.........                                                           9 / 9 (100%)

Time: 00:00.022, Memory: 10.00 MB

OK (9 tests, 19 assertions)

gitressa avatar Dec 16 '22 09:12 gitressa