class SectionListTraitTest in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest
- 9 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 extends \PHPUnit\Framework\TestCase implements ServiceProviderInterface uses \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, AssertContentTrait, ConfigTestTrait, ExtensionListTestTrait, RandomGeneratorTrait, TestRequirementsTrait, PhpUnitWarnings
- class \Drupal\KernelTests\Core\Entity\EntityKernelTestBase uses UserCreationTrait
- class \Drupal\Tests\layout_builder\Kernel\SectionListTestBase
- class \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest
- class \Drupal\Tests\layout_builder\Kernel\SectionListTestBase
- class \Drupal\KernelTests\Core\Entity\EntityKernelTestBase uses UserCreationTrait
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();
}
}