These failures appear in our most recent weekly test results dated 6 Oct 21, found at https://www.drupal.org/pift-ci-job/2199994 The previous week's results (29 Sept 21) did not have these failures.
The failures look like this:
Role label is expected to be a string. in /var/www/html/core/modules/user/user.module:851
The core change that caused this failure was #3232673: \Drupal\Core\Entity\EntityInterface::label() can return a NULL, which was committed on 30 Sept 21. That issue added an assert() into the user module to ensure that all Roles had a label. This was not explicitly checked in prior versions of core.
When Entity API tests need to use Roles, the tests create them like this: $role = Role::create(['id' => 'test_role']); which creates the Role with just an id but no label. This was common practice, and many core tests did the same thing. But this will no longer be sufficient. Core changed that in #3232673: \Drupal\Core\Entity\EntityInterface::label() can return a NULL so now Entity API has to change its tests also to ensure that the created Roles always have labels.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3241699-2-role-label.patch | 2.13 KB | tr |
Comments
Comment #2
tr commentedComment #3
tr commentedThat fixed all the "Role label is expected to be a string." test failures.
Comment #4
tr commentedBecause it's impossible to maintain a module with test failures, I'm going to just commit this even though no-one has bothered to review it.