function BookUninstallValidatorTest::testValidateEntityQueryWithoutResults
Same name in other branches
- 9 core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::testValidateEntityQueryWithoutResults()
- 8.9.x core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::testValidateEntityQueryWithoutResults()
- 11.x core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::testValidateEntityQueryWithoutResults()
@covers ::validate
File
-
core/
modules/ book/ tests/ src/ Unit/ BookUninstallValidatorTest.php, line 51
Class
- BookUninstallValidatorTest
- @coversDefaultClass \Drupal\book\BookUninstallValidator @group book @group legacy
Namespace
Drupal\Tests\book\UnitCode
public function testValidateEntityQueryWithoutResults() : void {
$this->bookUninstallValidator
->expects($this->once())
->method('hasBookOutlines')
->willReturn(FALSE);
$this->bookUninstallValidator
->expects($this->once())
->method('hasBookNodes')
->willReturn(FALSE);
$module = 'book';
$expected = [];
$reasons = $this->bookUninstallValidator
->validate($module);
$this->assertEquals($expected, $reasons);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.