function UpdateHookRegistryTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php \Drupal\Tests\Core\Update\UpdateHookRegistryTest::setUp()
  2. 11.x core/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php \Drupal\Tests\Core\Update\UpdateHookRegistryTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php, line 84

Class

UpdateHookRegistryTest
@coversDefaultClass \Drupal\Core\Update\UpdateHookRegistry @group Update

Namespace

Drupal\Tests\Core\Update

Code

protected function setUp() : void {
    parent::setUp();
    $this->keyValueFactory = $this->createMock(KeyValueFactoryInterface::class);
    $this->keyValueStore = $this->createMock(KeyValueStoreInterface::class);
    $this->equivalentUpdatesStore = $this->createMock(KeyValueStoreInterface::class);
    $this->keyValueFactory
        ->method('get')
        ->willReturnMap([
        [
            'system.schema',
            $this->keyValueStore,
        ],
        [
            'core.equivalent_updates',
            $this->equivalentUpdatesStore,
        ],
    ]);
}

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