function SqlDeprecationTest::testOptionalParametersDeprecation

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlDeprecationTest.php \Drupal\Tests\migrate\Kernel\Plugin\id_map\SqlDeprecationTest::testOptionalParametersDeprecation()
  2. 10 core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlDeprecationTest.php \Drupal\Tests\migrate\Kernel\Plugin\id_map\SqlDeprecationTest::testOptionalParametersDeprecation()

@covers \Drupal\migrate\Plugin\migrate\id_map\Sql::__construct

File

core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlDeprecationTest.php, line 24

Class

SqlDeprecationTest
Tests deprecation notice in Sql constructor.

Namespace

Drupal\Tests\migrate\Kernel\Plugin\id_map

Code

public function testOptionalParametersDeprecation() : void {
    $migration = $this->prophesize('\\Drupal\\migrate\\Plugin\\MigrationInterface')
        ->reveal();
    $this->expectDeprecation('Calling Sql::__construct() without the $migration_manager argument is deprecated in drupal:9.5.0 and the $migration_manager argument will be required in drupal:11.0.0. See https://www.drupal.org/node/3277306');
    new Sql([], 'sql', [], $migration, $this->container
        ->get('event_dispatcher'));
}

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