function LayoutPluginManagerTest::testProcessDefinitionWithMissingLayoutCategory
Tests ::processDefinition() with a layout that doesn't have a category.
@legacy-covers ::processDefinition
File
-
core/
tests/ Drupal/ Tests/ Core/ Layout/ LayoutPluginManagerTest.php, line 314
Class
Namespace
Drupal\Tests\Core\LayoutCode
public function testProcessDefinitionWithMissingLayoutCategory() : void {
$module_a_category_less_layout = <<<'EOS'
module_a_category_less_layout:
label: Category-less Layout
description: A layout that doesn't have a category.
EOS;
$file_name = 'module_a.layouts.yml';
vfsStream::create([
'modules' => [
'module_a' => [
$file_name => $module_a_category_less_layout,
],
],
]);
$definitions = $this->layoutPluginManager
->getDefinitions();
$this->assertEquals($file_name, $definitions['module_a_category_less_layout']->getCategory());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.