function BlockThemeDeprecationTest::testConstructorDeprecation

Same name in other branches
  1. 10 core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockThemeDeprecationTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockThemeDeprecationTest::testConstructorDeprecation()

Tests the deprecation in the constructor.

File

core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockThemeDeprecationTest.php, line 22

Class

BlockThemeDeprecationTest
Tests the deprecation notices of the block theme.

Namespace

Drupal\Tests\block\Unit\Plugin\migrate\process

Code

public function testConstructorDeprecation() : void {
    $this->expectDeprecation('Calling Drupal\\block\\Plugin\\migrate\\process\\BlockTheme::__construct() with the $migration argument is deprecated in drupal:10.1.0 and is removed in drupal:11.0.0. See https://www.drupal.org/node/3323212');
    $migration = $this->prophesize(MigrationInterface::class);
    $config = $this->prophesize(Config::class);
    new BlockTheme([], '', [], $migration->reveal(), $config->reveal(), []);
}

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