function BookManagerTest::setUp

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

Overrides UnitTestCase::setUp

File

core/modules/book/tests/src/Unit/BookManagerTest.php, line 60

Class

BookManagerTest
@coversDefaultClass \Drupal\book\BookManager @group book

Namespace

Drupal\Tests\book\Unit

Code

protected function setUp() {
    $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class);
    $this->translation = $this->getStringTranslationStub();
    $this->configFactory = $this->getConfigFactoryStub([]);
    $this->bookOutlineStorage = $this->createMock('Drupal\\book\\BookOutlineStorageInterface');
    $this->renderer = $this->createMock('\\Drupal\\Core\\Render\\RendererInterface');
    $this->bookManager = new BookManager($this->entityTypeManager, $this->translation, $this->configFactory, $this->bookOutlineStorage, $this->renderer);
}

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