function FileStorageTest::testlistAll
Same name in other branches
- 8.9.x core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::testlistAll()
- 10 core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::testListAll()
- 11.x core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::testListAll()
Tests the FileStorage::listAll method with a relative and absolute path.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ Storage/ FileStorageTest.php, line 59
Class
- FileStorageTest
- Tests FileStorage operations.
Namespace
Drupal\KernelTests\Core\Config\StorageCode
public function testlistAll() {
$expected_files = [
'core.extension',
'system.performance',
];
$config_files = $this->storage
->listAll();
$this->assertSame($expected_files, $config_files, 'Relative path, two config files found.');
// @todo https://www.drupal.org/node/2666954 FileStorage::listAll() is
// case-sensitive. However, \Drupal\Core\Config\DatabaseStorage::listAll()
// is case-insensitive.
$this->assertSame([
'system.performance',
], $this->storage
->listAll('system'), 'The FileStorage::listAll() with prefix works.');
$this->assertSame([], $this->storage
->listAll('System'), 'The FileStorage::listAll() is case sensitive.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.