You are here

public function MigrateFieldPluginManagerTest::testDeprecatedPluginDirectAccess in Drupal 8

Tests that deprecated plugins can still be directly created.

Tests that a deprecated plugin triggers an error on instantiation. This test has an implicit assertion that the deprecation error will be triggered and does not need an explicit assertion to pass.

@covers ::createInstance @group legacy @expectedDeprecation DateField is deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.x. Use \Drupal\datetime\Plugin\migrate\field\DateField instead.

File

core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php, line 118

Class

MigrateFieldPluginManagerTest
Tests the field plugin manager.

Namespace

Drupal\Tests\migrate_drupal\Kernel

Code

public function testDeprecatedPluginDirectAccess() {
  $this->pluginManager
    ->createInstance('date');
}