Replace the test helpers Drupal 11.5 deprecated, which fail the next major phpstan job

18 calls in 11 test files: 15 to user_role_grant_permissions(), 2 to user_role_revoke_permissions() and 1 to BrowserTestBase::xpath().

The replacements the deprecation messages name arrived with the deprecations in 11.5, and 4.x requires ^11.4 || ^12, so the literal swap is not available. Used instead what predates 11.4: UserCreationTrait::grantPermissions(), which these tests already have through BrowserTestBase, RoleInterface::revokePermission() followed by a save, and findAll('xpath', ...) on the page.

Run on core 12 locally: 186 tests, 2611 assertions, no failures across domain, domain_alias and domain_config_language.

Merge request reports

Loading
Loading