function BookUninstallValidatorTest::setUp

Same name in other branches
  1. 9 core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::setUp()
  2. 8.9.x core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::setUp()
  3. 11.x core/modules/book/tests/src/Unit/BookUninstallValidatorTest.php \Drupal\Tests\book\Unit\BookUninstallValidatorTest::setUp()

Overrides UnitTestCase::setUp

File

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

Class

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

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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.