public function NullStorageTest::testCollection in Drupal 9
Same name and namespace in other branches
- 8 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 19
Class
- NullStorageTest
- Tests the NullStorage.
Namespace
Drupal\Tests\Core\ConfigCode
public function testCollection() {
$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());
}