function MigrateEntityContentBaseTest::testAccountSwitcherBackwardsCompatibility

Test BC injection of account switcher service.

@group legacy

File

core/modules/migrate/tests/src/Kernel/MigrateEntityContentBaseTest.php, line 316

Class

MigrateEntityContentBaseTest
Tests the EntityContentBase destination.

Namespace

Drupal\Tests\migrate\Kernel

Code

public function testAccountSwitcherBackwardsCompatibility() {
    $this->expectDeprecation('Calling Drupal\\migrate\\Plugin\\migrate\\destination\\EntityContentBase::__construct() without the $account_switcher argument is deprecated in drupal:9.3.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3142975');
    $destination = new EntityContentBase([], 'fake_plugin_id', [], $this->createMock(MigrationInterface::class), $this->storage, [], $this->container
        ->get('entity_field.manager'), $this->container
        ->get('plugin.manager.field.field_type'));
    $this->assertInstanceOf(EntityContentBase::class, $destination);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.