You are here

public function LayoutEntityHelperTraitTest::testIsEntityUsingFieldOverride in Drupal 8

@covers ::isEntityUsingFieldOverride

@dataProvider providerTestIsEntityUsingFieldOverride

@expectedDeprecation \Drupal\layout_builder\LayoutEntityHelperTrait::isEntityUsingFieldOverride() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Internal storage of overrides may change so the existence of the field does not necessarily guarantee an overridable entity. See https://www.drupal.org/node/3030609.

@group legacy

File

core/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php, line 32

Class

LayoutEntityHelperTraitTest
@coversDefaultClass \Drupal\layout_builder\LayoutEntityHelperTrait

Namespace

Drupal\Tests\layout_builder\Unit

Code

public function testIsEntityUsingFieldOverride(EntityInterface $entity, $expected) {
  $test_class = new TestClass();
  $this
    ->assertSame($expected, $test_class
    ->isEntityUsingFieldOverride($entity));
}