You are here

protected function SqlContentEntityStorageTest::setUpModuleHandlerNoImplementations in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::setUpModuleHandlerNoImplementations()
  2. 9 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::setUpModuleHandlerNoImplementations()

Sets up the module handler with no implementations.

File

core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php, line 1445
Contains \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest.

Class

SqlContentEntityStorageTest
@coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorage @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

protected function setUpModuleHandlerNoImplementations() {
  $this->moduleHandler
    ->expects($this
    ->any())
    ->method('invokeAllWith')
    ->willReturnMap([
    [
      'entity_load',
      [],
    ],
    [
      $this->entityTypeId . '_load',
      [],
    ],
  ]);
  $this->container
    ->set('module_handler', $this->moduleHandler);
}