function MigrateFieldDeprecationTest::testDeprecatedEntityReference

Tests trigger_error when an EntityReference object is created.

@expectedDeprecation Drupal\Core\Field\Plugin\migrate\field\d7\EntityReference is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\field\Plugin\migrate\field\d7\EntityReference instead. See https://www.drupal.org/node/3009286

File

core/tests/Drupal/Tests/Core/Field/MigrateFieldDeprecationTest.php, line 32

Class

MigrateFieldDeprecationTest
Test trigger_error is fired when deprecated classes are instantiated.

Namespace

Drupal\Tests\Core\Field

Code

public function testDeprecatedEntityReference() {
    new EntityReference([], 'entityreference', []);
}

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