Verified Commit 11ac8359 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3363873 by Wim Leers: Stop using `first-uuid` and `second-uuid` in...

Issue #3363873 by Wim Leers: Stop using `first-uuid` and `second-uuid` in tests: violates config schema
parent eaf54026
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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']]
      ),
+1 −1
Original line number Diff line number Diff line
@@ -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();
  }

+1 −1
Original line number Diff line number Diff line
@@ -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']),
      ]),
    ];

+9 −9
Original line number Diff line number Diff line
@@ -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']),
      ]),
    ];

+1 −1
Original line number Diff line number Diff line
@@ -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]);
Loading