$layout_definition =
$this->layoutPluginManager->
getDefinition('theme_a_provided_layout'
);
$this->
assertSame('theme_a_provided_layout',
$layout_definition->
id());
$this->
assertSame('2 column layout',
(string) $layout_definition->
getLabel());
$this->
assertSame('Columns: 2',
(string) $layout_definition->
getCategory());
$this->
assertSame('A theme provided layout',
(string) $layout_definition->
getDescription());
$this->
assertInstanceOf(TranslatableMarkup::
class,
$layout_definition->
getLabel());
$this->
assertInstanceOf(TranslatableMarkup::
class,
$layout_definition->
getCategory());
$this->
assertInstanceOf(TranslatableMarkup::
class,
$layout_definition->
getDescription());
$this->
assertSame('twocol',
$layout_definition->
getTemplate());
$this->
assertSame('themes/theme_a/templates',
$layout_definition->
getPath());
$this->
assertSame('theme_a/twocol',
$layout_definition->
getLibrary());
$this->
assertSame('twocol',
$layout_definition->
getThemeHook());
$this->
assertSame('themes/theme_a/templates',
$layout_definition->
getTemplatePath());
$this->
assertSame('theme_a',
$layout_definition->
getProvider());
$this->
assertSame('right',
$layout_definition->
getDefaultRegion());
$this->
assertSame(LayoutDefault::
class,
$layout_definition->
getClass());
$expected_regions =
[ 'left' =>
[ 'label' =>
new TranslatableMarkup('Left region',
[],
['context' => 'layout_region'
]),
],
'right' =>
[ 'label' =>
new TranslatableMarkup('Right region',
[],
['context' => 'layout_region'
]),
],
];