Skip to content

Update XML configuration in phpunit.xml #79

@gitressa

Description

@gitressa

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions