function RecipeMultipleModulesConfigStorageTest::testListAllWithPrefix
Same name and namespace in other branches
- main core/tests/Drupal/Tests/Core/Recipe/RecipeMultipleModulesConfigStorageTest.php \Drupal\Tests\Core\Recipe\RecipeMultipleModulesConfigStorageTest::testListAllWithPrefix()
Tests listAll() with a prefix filter.
File
-
core/
tests/ Drupal/ Tests/ Core/ Recipe/ RecipeMultipleModulesConfigStorageTest.php, line 222
Class
- RecipeMultipleModulesConfigStorageTest
- Tests RecipeMultipleModulesConfigStorage.
Namespace
Drupal\Tests\Core\RecipeCode
public function testListAllWithPrefix() : void {
$storage = RecipeMultipleModulesConfigStorage::createFromModuleList([
'system',
'user',
], $this->extensionList);
$this->assertSame([], $storage->listAll('node.'));
$this->assertSame([
'system.site',
], $storage->listAll('system.'));
$this->assertSame([], $storage->listAll('nonexistent.'));
// Prefix not ending in a dot that matches items.
$this->assertSame([
'system.site',
], $storage->listAll('system'));
// Prefix not ending in a dot that matches nothing.
$this->assertSame([], $storage->listAll('node'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.