function NullStorageTest::testCollection
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Config/NullStorageTest.php \Drupal\Tests\Core\Config\NullStorageTest::testCollection()
- 8.9.x core/tests/Drupal/Tests/Core/Config/NullStorageTest.php \Drupal\Tests\Core\Config\NullStorageTest::testCollection()
- 10 core/tests/Drupal/Tests/Core/Config/NullStorageTest.php \Drupal\Tests\Core\Config\NullStorageTest::testCollection()
Tests createCollection.
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ NullStorageTest.php, line 21
Class
- NullStorageTest
- Tests the NullStorage.
Namespace
Drupal\Tests\Core\ConfigCode
public function testCollection() : void {
$nullStorage = new NullStorage();
$collection = $nullStorage->createCollection('test');
$this->assertInstanceOf(StorageInterface::class, $collection);
$this->assertEquals(StorageInterface::DEFAULT_COLLECTION, $nullStorage->getCollectionName());
$this->assertEquals('test', $collection->getCollectionName());
$this->assertSame([], $collection->getAllCollectionNames());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.