diff --git a/core/modules/book/tests/src/Unit/BookManagerTest.php b/core/modules/book/tests/src/Unit/BookManagerTest.php index 40ee4636e5..d37b0fceac 100644 --- a/core/modules/book/tests/src/Unit/BookManagerTest.php +++ b/core/modules/book/tests/src/Unit/BookManagerTest.php @@ -5,7 +5,6 @@ use Drupal\book\BookManager; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Tests\UnitTestCase; -use Drupal\Core\DependencyInjection\ContainerBuilder; /** * @coversDefaultClass \Drupal\book\BookManager @@ -55,26 +54,16 @@ class BookManagerTest extends UnitTestCase { */ protected $bookOutlineStorage; - /** - * The cache service. - * - * @var \Drupal\Core\Cache\CacheBackendInterface - */ - protected $cache; - /** * {@inheritdoc} */ protected function setUp(): void { - $container = new ContainerBuilder(); $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'); - $container->set('cache.data', $this->createMock('\Drupal\Core\Cache\CacheBackendInterface')); - $this->cache = $this->createMock('\Drupal\Core\Cache\CacheBackendInterface'); - $this->bookManager = new BookManager($this->entityTypeManager, $this->translation, $this->configFactory, $this->bookOutlineStorage, $this->renderer, $this->cache); + $this->bookManager = new BookManager($this->entityTypeManager, $this->translation, $this->configFactory, $this->bookOutlineStorage, $this->renderer); } /**