Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / layout_builder / tests / src / Kernel / SectionStorageTestBase.php
index 1879977633e3abc9b192d8fafc41c22f082c3311..6c54d6c9e4ff75fb48e628d533fa33d86e2e32a0 100644 (file)
@@ -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.
    *