public function NullStorageTest::testCollection in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Config/NullStorageTest.php \Drupal\Tests\Core\Config\NullStorageTest::testCollection()
Test 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
->assertArrayEquals([], $collection
->getAllCollectionNames());
}