.../src/Kernel/DefaultsSectionStorageTest.php | 2 +- .../Kernel/LayoutBuilderEntityViewDisplayTest.php | 2 +- .../src/Kernel/OverridesSectionStorageTest.php | 2 +- .../tests/src/Kernel/SectionListTestBase.php | 18 ++++++------- .../tests/src/Kernel/TranslatableFieldTest.php | 2 +- .../layout_builder/tests/src/Unit/SectionTest.php | 30 +++++++++++----------- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php b/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php index bfa49065b5..70b9df20f1 100644 --- a/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php @@ -114,7 +114,7 @@ public function providerTestAccess() { 'layout_onecol', [], [ - 'first-uuid' => new SectionComponent('first-uuid', 'content', ['id' => 'foo'], ['harold' => 'maude']), + '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo'], ['harold' => 'maude']), ], ['layout_builder_defaults_test' => ['which_party' => 'third']] ), diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php index 3d4d2052ec..53f61b49e3 100644 --- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php @@ -37,7 +37,7 @@ protected function getSectionList(array $section_data) { */ public function testInvalidConfiguration() { $this->expectException(SchemaIncompleteException::class); - $this->sectionList->getSection(0)->getComponent('first-uuid')->setConfiguration(['id' => 'foo', 'bar' => 'baz']); + $this->sectionList->getSection(0)->getComponent('10000000-0000-1000-a000-000000000000')->setConfiguration(['id' => 'foo', 'bar' => 'baz']); $this->sectionList->save(); } diff --git a/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php b/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php index ef67ae87ac..f247117b26 100644 --- a/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php @@ -119,7 +119,7 @@ public function testAccess($expected, $is_enabled, array $section_data, array $p public function providerTestAccess() { $section_data = [ new Section('layout_onecol', [], [ - 'first-uuid' => new SectionComponent('first-uuid', 'content', ['id' => 'foo']), + '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), ]; diff --git a/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php b/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php index a7388d205a..0a769bca3b 100644 --- a/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php +++ b/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php @@ -37,10 +37,10 @@ protected function setUp(): void { $section_data = [ new Section('layout_test_plugin', [], [ - 'first-uuid' => new SectionComponent('first-uuid', 'content', ['id' => 'foo']), + '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), new Section('layout_test_plugin', ['setting_1' => 'bar'], [ - 'second-uuid' => new SectionComponent('second-uuid', 'content', ['id' => 'foo']), + '20000000-0000-1000-a000-000000000000' => new SectionComponent('20000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), ]; $this->sectionList = $this->getSectionList($section_data); @@ -63,10 +63,10 @@ abstract protected function getSectionList(array $section_data); public function testGetSections() { $expected = [ new Section('layout_test_plugin', ['setting_1' => 'Default'], [ - 'first-uuid' => new SectionComponent('first-uuid', 'content', ['id' => 'foo']), + '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), new Section('layout_test_plugin', ['setting_1' => 'bar'], [ - 'second-uuid' => new SectionComponent('second-uuid', 'content', ['id' => 'foo']), + '20000000-0000-1000-a000-000000000000' => new SectionComponent('20000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), ]; $this->assertSections($expected); @@ -94,11 +94,11 @@ public function testGetSectionInvalidDelta() { public function testInsertSection() { $expected = [ new Section('layout_test_plugin', ['setting_1' => 'Default'], [ - 'first-uuid' => new SectionComponent('first-uuid', 'content', ['id' => 'foo']), + '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), new Section('layout_onecol'), new Section('layout_test_plugin', ['setting_1' => 'bar'], [ - 'second-uuid' => new SectionComponent('second-uuid', 'content', ['id' => 'foo']), + '20000000-0000-1000-a000-000000000000' => new SectionComponent('20000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), ]; @@ -112,10 +112,10 @@ public function testInsertSection() { public function testAppendSection() { $expected = [ new Section('layout_test_plugin', ['setting_1' => 'Default'], [ - 'first-uuid' => new SectionComponent('first-uuid', 'content', ['id' => 'foo']), + '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), new Section('layout_test_plugin', ['setting_1' => 'bar'], [ - 'second-uuid' => new SectionComponent('second-uuid', 'content', ['id' => 'foo']), + '20000000-0000-1000-a000-000000000000' => new SectionComponent('20000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), new Section('layout_onecol'), ]; @@ -156,7 +156,7 @@ public function providerTestRemoveAllSections() { public function testRemoveSection() { $expected = [ new Section('layout_test_plugin', ['setting_1' => 'bar'], [ - 'second-uuid' => new SectionComponent('second-uuid', 'content', ['id' => 'foo']), + '20000000-0000-1000-a000-000000000000' => new SectionComponent('20000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), ]; diff --git a/core/modules/layout_builder/tests/src/Kernel/TranslatableFieldTest.php b/core/modules/layout_builder/tests/src/Kernel/TranslatableFieldTest.php index 68eb7cb61c..a61f302bcb 100644 --- a/core/modules/layout_builder/tests/src/Kernel/TranslatableFieldTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/TranslatableFieldTest.php @@ -67,7 +67,7 @@ protected function setUp(): void { public function testSectionsClearedOnCreateTranslation() { $section_data = [ new Section('layout_onecol', [], [ - 'first-uuid' => new SectionComponent('first-uuid', 'content', ['id' => 'foo']), + '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), ]), ]; $entity = EntityTest::create([OverridesSectionStorage::FIELD_NAME => $section_data]); diff --git a/core/modules/layout_builder/tests/src/Unit/SectionTest.php b/core/modules/layout_builder/tests/src/Unit/SectionTest.php index 7e3c5b1302..65f65d6a6a 100644 --- a/core/modules/layout_builder/tests/src/Unit/SectionTest.php +++ b/core/modules/layout_builder/tests/src/Unit/SectionTest.php @@ -34,8 +34,8 @@ protected function setUp(): void { [], [ new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']), - (new SectionComponent('second-uuid', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), - (new SectionComponent('first-uuid', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), + (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), + (new SectionComponent('10000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), ], [ 'bad_judgement' => ['blink_speed' => 'fast', 'spin_direction' => 'clockwise'], @@ -52,8 +52,8 @@ protected function setUp(): void { public function testGetComponents() { $expected = [ 'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0), - 'second-uuid' => (new SectionComponent('second-uuid', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), - 'first-uuid' => (new SectionComponent('first-uuid', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), + '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), + '10000000-0000-1000-a000-000000000000' => (new SectionComponent('10000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), ]; $this->assertComponents($expected, $this->section); @@ -84,10 +84,10 @@ public function testGetComponent() { public function testRemoveComponent() { $expected = [ 'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0), - 'second-uuid' => (new SectionComponent('second-uuid', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), + '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), ]; - $this->section->removeComponent('first-uuid'); + $this->section->removeComponent('10000000-0000-1000-a000-000000000000'); $this->assertComponents($expected, $this->section); } @@ -99,8 +99,8 @@ public function testRemoveComponent() { public function testAppendComponent() { $expected = [ 'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0), - 'second-uuid' => (new SectionComponent('second-uuid', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), - 'first-uuid' => (new SectionComponent('first-uuid', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), + '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), + '10000000-0000-1000-a000-000000000000' => (new SectionComponent('10000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), 'new-uuid' => (new SectionComponent('new-uuid', 'some-region', []))->setWeight(1), ]; @@ -114,12 +114,12 @@ public function testAppendComponent() { public function testInsertAfterComponent() { $expected = [ 'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0), - 'second-uuid' => (new SectionComponent('second-uuid', 'ordered-region', ['id' => 'second-block-id']))->setWeight(4), - 'first-uuid' => (new SectionComponent('first-uuid', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), + '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(4), + '10000000-0000-1000-a000-000000000000' => (new SectionComponent('10000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), 'new-uuid' => (new SectionComponent('new-uuid', 'ordered-region', []))->setWeight(3), ]; - $this->section->insertAfterComponent('first-uuid', new SectionComponent('new-uuid', 'ordered-region')); + $this->section->insertAfterComponent('10000000-0000-1000-a000-000000000000', new SectionComponent('new-uuid', 'ordered-region')); $this->assertComponents($expected, $this->section); } @@ -148,8 +148,8 @@ public function testInsertAfterComponentInvalidUuid() { public function testInsertComponent() { $expected = [ 'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0), - 'second-uuid' => (new SectionComponent('second-uuid', 'ordered-region', ['id' => 'second-block-id']))->setWeight(4), - 'first-uuid' => (new SectionComponent('first-uuid', 'ordered-region', ['id' => 'first-block-id']))->setWeight(3), + '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(4), + '10000000-0000-1000-a000-000000000000' => (new SectionComponent('10000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'first-block-id']))->setWeight(3), 'new-uuid' => (new SectionComponent('new-uuid', 'ordered-region', []))->setWeight(2), ]; @@ -163,8 +163,8 @@ public function testInsertComponent() { public function testInsertComponentAppend() { $expected = [ 'existing-uuid' => (new SectionComponent('existing-uuid', 'some-region', ['id' => 'existing-block-id']))->setWeight(0), - 'second-uuid' => (new SectionComponent('second-uuid', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), - 'first-uuid' => (new SectionComponent('first-uuid', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), + '20000000-0000-1000-a000-000000000000' => (new SectionComponent('20000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'second-block-id']))->setWeight(3), + '10000000-0000-1000-a000-000000000000' => (new SectionComponent('10000000-0000-1000-a000-000000000000', 'ordered-region', ['id' => 'first-block-id']))->setWeight(2), 'new-uuid' => (new SectionComponent('new-uuid', 'ordered-region', []))->setWeight(4), ];