function SharedDatabaseStateTest::testInitialState
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/SharedDatabaseStateTest.php \Drupal\KernelTests\SharedDatabaseStateTest::testInitialState()
Tests that the state built once per class is visible to a test method.
Attributes
#[Depends('testFirst')]
File
-
core/
tests/ Drupal/ KernelTests/ SharedDatabaseStateTest.php, line 87
Class
- SharedDatabaseStateTest
- Tests the shared database state of Drupal\KernelTests\KernelTestBase.
Namespace
Drupal\KernelTestsCode
public function testInitialState() : void {
// Default configuration installed by ::setUpEnvironment() is readable.
$this->assertNotEmpty($this->config('system.date')
->get('timezone'));
// The installed entity type definitions outlived the process that wrote
// them, so the entity storage is usable.
$this->assertSame([], User::loadMultiple());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.