Problem/Motivation

I've started running kernel tests against modules and got these deprecation warnings in the profile module:

OK (9 tests, 149 assertions)

Remaining self deprecation notices (5)

  4x: Calling createUser() with $permissions as the second parameter is deprecated in drupal:10.1.0 and will be removed from drupal:11.0.0. Use createUser(array $permissions = [], $name = NULL, $admin = FALSE, array $values = []) instead. See https://www.drupal.org/node/3330762
    3x in ProfileRoleAccessTest::testProfileOperations from Drupal\Tests\profile\Kernel
    1x in ProfileRoleAccessTest::testProfileCreate from Drupal\Tests\profile\Kernel

  1x: The Drupal\Tests\field\Traits\EntityReferenceTestTrait is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Instead, use \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait. See https://www.drupal.org/node/3401941
    1x in KernelTestSuite::suite from Drupal\Tests\TestSuites

Steps to reproduce

Run the tests in profile. The way I am doing it is with:

phpunit testsuite="kernel" --group="profile"

Proposed resolution

Follow the suggestions to replace the function and class.

Comments

ryanrobinson_wlu created an issue. See original summary.

jsacksick’s picture

Status: Active » Fixed

Thanks for the report, fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.