function LayoutSectionItemListTest::testEquals

Same name in other branches
  1. 9 core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php \Drupal\Tests\layout_builder\Kernel\LayoutSectionItemListTest::testEquals()
  2. 10 core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php \Drupal\Tests\layout_builder\Kernel\LayoutSectionItemListTest::testEquals()
  3. 11.x core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php \Drupal\Tests\layout_builder\Kernel\LayoutSectionItemListTest::testEquals()

@covers ::equals

File

core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php, line 56

Class

LayoutSectionItemListTest
Tests the field type for Layout Sections.

Namespace

Drupal\Tests\layout_builder\Kernel

Code

public function testEquals() {
    $this->sectionStorage
        ->getSection(0)
        ->setLayoutSettings([
        'foo' => 1,
    ]);
    $second_section_storage = clone $this->sectionStorage;
    $this->assertTrue($this->sectionStorage
        ->equals($second_section_storage));
    $second_section_storage->getSection(0)
        ->setLayoutSettings([
        'foo' => '1',
    ]);
    $this->assertFalse($this->sectionStorage
        ->equals($second_section_storage));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.