function BookUninstallValidatorTest::testValidateOutlineStorage
Same name in other branches
- 9 core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::testValidateOutlineStorage()
- 8.9.x core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::testValidateOutlineStorage()
- 11.x core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::testValidateOutlineStorage()
@covers ::validate
File
-
core/
modules/ book/ tests/ src/ Unit/ BookUninstallValidatorTest.php, line 85
Class
- BookUninstallValidatorTest
- @coversDefaultClass \Drupal\book\BookUninstallValidator @group book @group legacy
Namespace
Drupal\Tests\book\UnitCode
public function testValidateOutlineStorage() : void {
$this->bookUninstallValidator
->expects($this->once())
->method('hasBookOutlines')
->willReturn(TRUE);
$this->bookUninstallValidator
->expects($this->never())
->method('hasBookNodes');
$module = 'book';
$expected = [
'To uninstall Book, delete all content that is part of a book',
];
$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.