X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flayout_builder%2Ftests%2Fsrc%2FKernel%2FSectionStorageTestBase.php;fp=web%2Fcore%2Fmodules%2Flayout_builder%2Ftests%2Fsrc%2FKernel%2FSectionStorageTestBase.php;h=6c54d6c9e4ff75fb48e628d533fa33d86e2e32a0;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=1879977633e3abc9b192d8fafc41c22f082c3311;hpb=9424afc6c1f518c301bf87a23c047d1873435d05;p=yaffs-website diff --git a/web/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php b/web/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php index 187997763..6c54d6c9e 100644 --- a/web/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php +++ b/web/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php @@ -137,6 +137,17 @@ abstract class SectionStorageTestBase extends EntityKernelTestBase { $this->assertSections($expected); } + /** + * Tests __clone(). + */ + public function testClone() { + $this->assertSame([], $this->sectionStorage->getSection(0)->getLayoutSettings()); + + $new_section_storage = clone $this->sectionStorage; + $new_section_storage->getSection(0)->setLayoutSettings(['asdf' => 'qwer']); + $this->assertSame([], $this->sectionStorage->getSection(0)->getLayoutSettings()); + } + /** * Asserts that the field list has the expected sections. *