protected static function FilteredStorageTest::getProtectedFilters in Config Filter 8
Same name and namespace in other branches
- 8.2 src/Tests/FilteredStorageTest.php \Drupal\config_filter\Tests\FilteredStorageTest::getProtectedFilters()
Get the filters from a FilteredStorageInterface.
Parameters
\Drupal\Core\Config\StorageInterface $storage: The storage with the protected filters property.
Return value
\Drupal\config_filter\Config\StorageFilterInterface[] The array of filters.
2 calls to FilteredStorageTest::getProtectedFilters()
- FilteredStorageTest::testCollectionStorages in src/
Tests/ FilteredStorageTest.php - Test that creating collections keeps filters set to the correct storages.
- FilteredStorageTest::testSettingStorages in src/
Tests/ FilteredStorageTest.php - Test that the storage is set on the filters.
File
- src/
Tests/ FilteredStorageTest.php, line 406
Class
- FilteredStorageTest
- Tests StorageWrapper operations using the CachedStorage.
Namespace
Drupal\config_filter\TestsCode
protected static function getProtectedFilters(StorageInterface $storage) {
$filterReflection = new \ReflectionClass(FilteredStorage::class);
$filtersProperty = $filterReflection
->getProperty('filters');
$filtersProperty
->setAccessible(TRUE);
return $filtersProperty
->getValue($storage);
}