X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flayout_discovery%2Ftests%2Fsrc%2FKernel%2FLayoutTest.php;fp=web%2Fcore%2Fmodules%2Flayout_discovery%2Ftests%2Fsrc%2FKernel%2FLayoutTest.php;h=c7be49ba2b1571108582a0b2b0aef9ac731c0084;hp=c04785055e9b54e74aad336d041e5077ce0c4f5c;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php b/web/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php index c04785055..c7be49ba2 100644 --- a/web/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php +++ b/web/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php @@ -33,6 +33,17 @@ class LayoutTest extends KernelTestBase { $this->layoutPluginManager = $this->container->get('plugin.manager.core.layout'); } + /** + * Tests that a layout provided by a theme has the preprocess function set. + */ + public function testThemeProvidedLayout() { + $this->container->get('theme_installer')->install(['test_layout_theme']); + $this->config('system.theme')->set('default', 'test_layout_theme')->save(); + + $theme_definitions = $this->container->get('theme.registry')->get(); + $this->assertTrue(in_array('template_preprocess_layout', $theme_definitions['test_layout_theme']['preprocess functions'])); + } + /** * Test rendering a layout. *