Drupal 11 PHPUnit tests failing

Created on 14 May 2024, about 1 month ago
Updated 31 May 2024, 26 days ago

Problem/Motivation

When running PHPUnit tests on Drupal 11 (i.e 11.0.0-alpha1), two tests are failing:

There were 2 errors:

1) Drupal\Tests\collapsiblock\Kernel\BlockViewTest::testViewBlock
RuntimeException: Cannot compare markup between MarkupInterface objects and plain strings

/Users/user1/drupal11/web/core/tests/Drupal/TestTools/Comparator/MarkupInterfaceComparator.php:42
/Users/user1/drupal11/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:83
/Users/user1/drupal11/web/modules/contrib/collapsiblock/tests/src/Kernel/BlockViewTest.php:64
/Users/user1/drupal11/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

2) Drupal\Tests\collapsiblock\Kernel\BlockViewTest::testViewBlockWithUnexpectedBlockValue
RuntimeException: Cannot compare markup between MarkupInterface objects and plain strings

/Users/user1/drupal11/web/core/tests/Drupal/TestTools/Comparator/MarkupInterfaceComparator.php:42
/Users/user1/drupal11/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:83
/Users/user1/drupal11/web/modules/contrib/collapsiblock/tests/src/Kernel/BlockViewTest.php:104
/Users/user1/drupal11/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

Steps to reproduce

  • Create a new project using drupal/recommended-project:11.0.0-alpha1.
  • Include drupal/core-dev and drush/drush in development dependency.
  • Run all PHPUnit tests and you'll notice two tests are failing.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇮🇳India vishalkhode

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024