function LayoutPluginManagerTest::testProcessDefinitionWithMissingLayoutLabel
Tests ::processDefinition() with a layout that doesn't have a label.
@legacy-covers ::processDefinition
File
-
core/
tests/ Drupal/ Tests/ Core/ Layout/ LayoutPluginManagerTest.php, line 293
Class
Namespace
Drupal\Tests\Core\LayoutCode
public function testProcessDefinitionWithMissingLayoutLabel() : void {
$this->expectDeprecation('A layout plugin not having a label is deprecated in drupal:11.4.0 and having a label will be enforced in drupal:12.0.0. See https://www.drupal.org/node/3464076');
$module_a_label_less_layout = <<<'EOS'
module_a_label_less_layout:
description: A layout that doesn't have a label.
EOS;
vfsStream::create([
'modules' => [
'module_a' => [
'module_a.layouts.yml' => $module_a_label_less_layout,
],
],
]);
$this->layoutPluginManager
->getDefinitions();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.