class NullStorageTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Config/NullStorageTest.php \Drupal\Tests\Core\Config\NullStorageTest
- 10 core/tests/Drupal/Tests/Core/Config/NullStorageTest.php \Drupal\Tests\Core\Config\NullStorageTest
- 8.9.x core/tests/Drupal/Tests/Core/Config/NullStorageTest.php \Drupal\Tests\Core\Config\NullStorageTest
Tests the NullStorage.
@group Config
Hierarchy
- class \Drupal\Tests\UnitTestCase uses \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\Core\Config\NullStorageTest extends \Drupal\Tests\UnitTestCase
Expanded class hierarchy of NullStorageTest
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ NullStorageTest.php, line 14
Namespace
Drupal\Tests\Core\ConfigView source
class NullStorageTest extends UnitTestCase {
/**
* Tests createCollection.
*/
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());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.