Loading
bug: #3631047: Kernel tests fail on Drupal 12
Closes #3631047
Test-only change; the module code is not touched.
Changes
ImageImporterTest,CameraTypeVocabTest,OrganizationLabelTest,OrganizationAccessTest: enablefilter. In Drupal 12,TextItemBase::applyDefaultValue()asksFilterFormatRepositoryInterfacefor the fallback format whenever a text field item is created, and kernel tests do not enable thetextdependency onfilterby themselves.EntityCrudTest:setUp()installs themapillary_image_typeandmapillary_imageschemas too, because themapillary_entityconfig creates field storages on images. Drupal 11.2 deprecates creating a field storage before its entity schema; Drupal 12 throws aLogicException. The duplicate schema install intestImageCreateLoadDelete()is removed.EntityApiPermissionsTest:testHandlers()andtestRoutes()get their own data providers (bundleEntityTypeProvider(),entityTypeIdProvider()), built fromentityTypeProvider(), so each data set has only the arguments the test accepts. PHPUnit 12 warned about the extra arguments.- CHANGELOG entry under Unreleased.
Upgrade path
None needed: no code, config or schema change.
Tests
The six changed classes pass on:
- Drupal 11.4.8, PHP 8.5, PHPUnit 11.5, PostgreSQL. The "field storage definition without the entity schema" deprecation is gone from
EntityCrudTest. - Drupal 12.0.0-beta1, PHP 8.5, PHPUnit 12.5, SQLite, with the Drupal 12 merge requests of Geofield (#3598572), Entity API (#3553240) and Leaflet (#3599631) and
|| ^12added locally to the Entity API and Leaflet info files.EntityApiPermissionsTestpasses with--fail-on-phpunit-warning.
phpcs (Drupal, DrupalPractice) and phpstan (level 6) report nothing on the changed lines.
Out of scope
The next major jobs stay manual: with the current Geofield release (10.3.4) they fail before reaching these tests, until #3598572 is released.