public function SectionListTestBase::testClone in Drupal 10
Same name and namespace in other branches
- 9 core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php \Drupal\Tests\layout_builder\Kernel\SectionListTestBase::testClone()
Tests __clone().
File
- core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php, line 181
Class
- SectionListTestBase
- Provides a base class for testing implementations of a section list.
Namespace
Drupal\Tests\layout_builder\KernelCode
public function testClone() {
$this
->assertSame([
'setting_1' => 'Default',
], $this->sectionList
->getSection(0)
->getLayoutSettings());
$new_section_storage = clone $this->sectionList;
$new_section_storage
->getSection(0)
->setLayoutSettings([
'asdf' => 'qwer',
]);
$this
->assertSame([
'setting_1' => 'Default',
], $this->sectionList
->getSection(0)
->getLayoutSettings());
}