function OverridesSectionStorageTest::testIsSupported
@legacy-covers ::isSupported
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ OverridesSectionStorageTest.php, line 320
Class
- OverridesSectionStorageTest
- Tests Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage.
Namespace
Drupal\Tests\layout_builder\KernelCode
public function testIsSupported() : void {
$display = LayoutBuilderEntityViewDisplay::create([
'targetEntityType' => 'entity_test',
'bundle' => 'entity_test',
'mode' => 'default',
'status' => TRUE,
]);
$display->enableLayoutBuilder()
->setOverridable()
->save();
$this->assertTrue($this->plugin
->isSupported('entity_test', 'entity_test', 'default'));
$display->setOverridable(FALSE)
->save();
$this->assertFalse($this->plugin
->isSupported('entity_test', 'entity_test', 'default'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.