You are here

protected function BookUninstallValidatorTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::setUp()
  2. 9 core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::setUp()

File

core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php, line 21

Class

BookUninstallValidatorTest
@coversDefaultClass \Drupal\book\BookUninstallValidator @group book

Namespace

Drupal\Tests\book\Unit

Code

protected function setUp() : void {
  parent::setUp();
  $this->bookUninstallValidator = $this
    ->getMockBuilder('Drupal\\book\\BookUninstallValidator')
    ->disableOriginalConstructor()
    ->onlyMethods([
    'hasBookOutlines',
    'hasBookNodes',
  ])
    ->getMock();
  $this->bookUninstallValidator
    ->setStringTranslation($this
    ->getStringTranslationStub());
}