function SectionStorageTestBase::testClone
Tests __clone().
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionStorageTestBase.php, line 183
Class
- SectionStorageTestBase
- Provides a base class for testing implementations of section storage.
Namespace
Drupal\Tests\layout_builder\KernelCode
public function testClone() {
$this->assertSame([
'setting_1' => 'Default',
], $this->sectionStorage
->getSection(0)
->getLayoutSettings());
$new_section_storage = clone $this->sectionStorage;
$new_section_storage->getSection(0)
->setLayoutSettings([
'asdf' => 'qwer',
]);
$this->assertSame([
'setting_1' => 'Default',
], $this->sectionStorage
->getSection(0)
->getLayoutSettings());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.