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 <a href="/api/drupal/core%21modules%21layout_builder%21src%21LayoutEntityHelperTrait.php/trait/LayoutEntityHelperTrait/8.9.x" title="Methods to help with entities using the layout builder." class="local">\Drupal\layout_builder\LayoutEntityHelperTrait</a>

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.