function ViewsModerationStateFilterTest::assertPluginStates
Same name in other branches
- 9 core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php \Drupal\Tests\content_moderation\Kernel\ViewsModerationStateFilterTest::assertPluginStates()
- 8.9.x core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php \Drupal\Tests\content_moderation\Kernel\ViewsModerationStateFilterTest::assertPluginStates()
- 11.x core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php \Drupal\Tests\content_moderation\Kernel\ViewsModerationStateFilterTest::assertPluginStates()
Assert the plugin states.
@internal
Parameters
string[] $states: The states which should appear in the filter.
1 call to ViewsModerationStateFilterTest::assertPluginStates()
- ViewsModerationStateFilterTest::testStateFilterStatesList in core/
modules/ content_moderation/ tests/ src/ Kernel/ ViewsModerationStateFilterTest.php - Tests the list of states in the filter plugin.
File
-
core/
modules/ content_moderation/ tests/ src/ Kernel/ ViewsModerationStateFilterTest.php, line 364
Class
- ViewsModerationStateFilterTest
- Tests the views 'moderation_state_filter' filter plugin.
Namespace
Drupal\Tests\content_moderation\KernelCode
protected function assertPluginStates(array $states) : void {
$plugin = Views::pluginManager('filter')->createInstance('moderation_state_filter', []);
$view = Views::getView('test_content_moderation_state_filter_base_table');
$plugin->init($view, $view->getDisplay());
$this->assertEquals($states, $plugin->getValueOptions());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.