function MigrateFieldPluginManagerTest::testDeprecatedPluginDirectAccess
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\KernelCode
public function testDeprecatedPluginDirectAccess() {
$this->pluginManager
->createInstance('date');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.