protected function SplitFilterTest::getFilter in Configuration Split 8
Returns a SplitFilter that can be used to test its behaviour.
Parameters
\Drupal\Core\Config\StorageInterface|null $storage: The Storage interface the filter can use as its alternative storage.
string[] $blacklist: The blacklisted configuration that is filtered out.
array $modules: The blacklisted modules that are removed from the core.extensions.
array $themes: The blacklisted themes that are removed from the core.extensions.
string[] $graylist: The graylisted configuration that is filtered out.
string $name: The name of the prophesied config object.
bool $skip_equal: The flag to skip equal config in graylist exports.
Return value
\Drupal\config_split\Plugin\ConfigFilter\SplitFilter The filter to test.
9 calls to SplitFilterTest::getFilter()
- SplitFilterTest::testFilterCreateCollection in src/
Tests/ SplitFilterTest.php - Test that the filter creates collections correctly.
- SplitFilterTest::testFilterDelete in src/
Tests/ SplitFilterTest.php - Test that the filter deletes correctly.
- SplitFilterTest::testFilterDeleteAll in src/
Tests/ SplitFilterTest.php - Test that the filter deletes all correctly.
- SplitFilterTest::testFilterExists in src/
Tests/ SplitFilterTest.php - Test that the filter checks existence correctly.
- SplitFilterTest::testFilterGetAllCollectionNames in src/
Tests/ SplitFilterTest.php - Test that the filter gets collections names correctly.
File
- src/
Tests/ SplitFilterTest.php, line 588
Class
- SplitFilterTest
- Test filter plugin.
Namespace
Drupal\config_split\TestsCode
protected function getFilter(StorageInterface $storage = NULL, array $blacklist = [], array $modules = [], array $themes = [], array $graylist = [], $name = 'config_split.config_split.test', $skip_equal = FALSE) {
$configuration = [];
$configuration['blacklist'] = $blacklist;
$configuration['graylist'] = $graylist;
$configuration['graylist_dependents'] = TRUE;
$configuration['graylist_skip_equal'] = $skip_equal;
$configuration['module'] = $modules;
$configuration['theme'] = $themes;
$configuration['config_name'] = $name;
// Return a new filter that behaves as intended.
return new SplitFilter($configuration, 'config_split', [], $this
->getConfigManagerMock($blacklist, $graylist, $modules, $themes), $storage);
}