function FilterUninstallValidatorTest::testValidateNoFormats
Same name in other branches
- 8.9.x core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php \Drupal\Tests\filter\Unit\FilterUninstallValidatorTest::testValidateNoFormats()
- 10 core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php \Drupal\Tests\filter\Unit\FilterUninstallValidatorTest::testValidateNoFormats()
- 11.x core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php \Drupal\Tests\filter\Unit\FilterUninstallValidatorTest::testValidateNoFormats()
@covers ::validate
File
-
core/
modules/ filter/ tests/ src/ Unit/ FilterUninstallValidatorTest.php, line 49
Class
- FilterUninstallValidatorTest
- @coversDefaultClass \Drupal\filter\FilterUninstallValidator @group filter
Namespace
Drupal\Tests\filter\UnitCode
public function testValidateNoFormats() {
$this->filterUninstallValidator
->expects($this->once())
->method('getFilterDefinitionsByProvider')
->willReturn([
'test_filter_plugin' => [
'id' => 'test_filter_plugin',
'provider' => 'filter_test',
],
]);
$this->filterUninstallValidator
->expects($this->once())
->method('getEnabledFilterFormats')
->willReturn([]);
$module = $this->randomMachineName();
$expected = [];
$reasons = $this->filterUninstallValidator
->validate($module);
$this->assertEquals($expected, $reasons);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.