class SectionListTraitTest
Same name and namespace in other branches
- 11.x core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest
- 10 core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest
- 8.9.x core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest
@coversDefaultClass \Drupal\layout_builder\SectionListTrait
@group layout_builder
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\KernelTests\Core\Entity\EntityKernelTestBase uses \Drupal\Tests\user\Traits\UserCreationTrait extends \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\layout_builder\Kernel\SectionListTestBase extends \Drupal\KernelTests\Core\Entity\EntityKernelTestBase
- class \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest extends \Drupal\Tests\layout_builder\Kernel\SectionListTestBase
- class \Drupal\Tests\layout_builder\Kernel\SectionListTestBase extends \Drupal\KernelTests\Core\Entity\EntityKernelTestBase
- class \Drupal\KernelTests\Core\Entity\EntityKernelTestBase uses \Drupal\Tests\user\Traits\UserCreationTrait extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of SectionListTraitTest
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTraitTest.php, line 14
Namespace
Drupal\Tests\layout_builder\KernelView source
class SectionListTraitTest extends SectionListTestBase {
/**
* {@inheritdoc}
*/
protected function getSectionList(array $section_data) {
return new TestSectionList($section_data);
}
/**
* @covers ::addBlankSection
*/
public function testAddBlankSection() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('A blank section must only be added to an empty list');
$this->sectionList
->addBlankSection();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.