\Drupal\Tests\mysql\Functional\RequirementsTest is always skipped

Created on 16 January 2024, about 1 year ago
Updated 2 February 2024, about 1 year ago

Problem/Motivation

In \Drupal\Tests\mysql\Functional\RequirementsTest::setUp the $connectionInfo['default']['driver'] is tested for not being 'mysql'.
If this is the case, the whole test class is skipped.

However, the correct driver would be 'Drupal\mysql\Driver\Database\mysql', so the test class is always skipped.

Steps to reproduce

Proposed resolution


Using Database::getConnection()->driver() seems more robust since we don't need the FQCN.

Note: Testable by going to the test result on GitLab, job "PHPUnit Functional 4/7 " (In the latest test run this is https://git.drupalcode.org/issue/drupal-3414957/-/jobs/642841).
Then browse/download the artifacts and make sure that in /browse/sites/simpletest/browser_output/ there are seven Drupal_Tests_mysql_Functional_RequirementsTest-*.html and one Drupal_Tests_mysql_Functional_RequirementsTest.counter files.
(In test runs without this change there are none of the above files.)

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

10.2 ✨

Component
MySQL driverΒ  β†’

Last updated 11 days ago

Created by

πŸ‡³πŸ‡±Netherlands spokje

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024