public function FileStorageTest::testlistAll in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Config/Storage/FileStorageTest.php \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::testlistAll()
- 9 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.');
}