function LayoutEntityHelperTraitTest::testIsEntityUsingFieldOverride

@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));
}

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