Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Many of migrate_drupal's PHPUnit tests are not true unit tests, but integration tests, because they rely on a database. Once the fake DB driver is gone (in #2499835: Remove broken Fake DB driver), they will be relying on SQLite, but still (ultimately) extending UnitTestBase.
Proposed Resolution
The tests should be converted to kernel tests, based on #2304461: KernelTestBaseTNG™. That way they can keep all their PHPUnit-ey goodness, but use a real database. Because that's what integration tests do. Until KTBNG lands, this is postponed.
Remaining Tasks
- Make any PHPUnit-based migrate_drupal test which relies on a database into a kernel test
- Review the patch
- Commit it
- Rejoice
Comments
Comment #1
phenaproximaUnblocked!
Comment #2
mikeryanReferring to the change notice:
(see the change notice for details on acceptable changes, e.g. file moves).
Now, I wonder if Migrate can be a little more flexible, since we're still kind of pre-beta?
Comment #3
neclimdultechnically still blocked. #2554241: mysql's Schema implementation can only provide information about the default connection. is blocking #2553661: KernelTestBase fails to set up FileCache which I would wager blocks this.
Comment #4
phenaproximaNo longer blocked, but still postponed until Drupal 8.0 is tagged. I think this is a good 8.1 target.
Comment #6
mikeryanThis can be done any time now...
Comment #13
heddnI don't think this is going to get changed at this late time in the game.