public function WebformNodeUninstallValidatorTest::testValidateEntityQueryWithResults in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_node/tests/src/Unit/WebformNodeUninstallValidatorTest.php \Drupal\Tests\webform_node\Unit\WebformNodeUninstallValidatorTest::testValidateEntityQueryWithResults()
@covers ::validate
File
- modules/
webform_node/ tests/ src/ Unit/ WebformNodeUninstallValidatorTest.php, line 62
Class
- WebformNodeUninstallValidatorTest
- @coversDefaultClass \Drupal\webform_node\WebformNodeUninstallValidator @group webform_node
Namespace
Drupal\Tests\webform_node\UnitCode
public function testValidateEntityQueryWithResults() {
$this->webformNodeUninstallValidator
->expects($this
->once())
->method('hasWebformNodes')
->willReturn(TRUE);
$module = 'webform_node';
$expected = [
'To uninstall Webform node, delete all content that has the Webform content type.',
];
$reasons = $this->webformNodeUninstallValidator
->validate($module);
$this
->assertEquals($expected, $reasons);
}