class SectionStorageTestBase
Same name and namespace in other branches
- 8.9.x core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php \Drupal\Tests\layout_builder\Kernel\SectionStorageTestBase
Provides a base class for testing implementations of section storage.
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\SectionStorageTestBase 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 SectionStorageTestBase
Deprecated
in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Tests\layout_builder\Kernel\SectionListTestBase instead.
See also
https://www.drupal.org/node/3091432
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionStorageTestBase.php, line 15
Namespace
Drupal\Tests\layout_builder\KernelView source
abstract class SectionStorageTestBase extends SectionListTestBase {
/**
* The section list implementation.
*
* @var \Drupal\layout_builder\SectionListInterface
*/
protected $sectionStorage;
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
// Provide backwards compatibility.
$this->sectionStorage = $this->sectionList;
}
/**
* Sets up the section list.
*
* @param array $section_data
* An array of section data.
*
* @return \Drupal\layout_builder\SectionListInterface
* The section list.
*/
abstract protected function getSectionStorage(array $section_data);
/**
* {@inheritdoc}
*/
protected function getSectionList(array $section_data) {
// Provide backwards compatibility.
return $this->getSectionStorage($section_data);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.