function UpdateHookRegistryTest::setUp

Same name and namespace in other branches
  1. 10 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 77

Class

UpdateHookRegistryTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Update%21UpdateHookRegistry.php/class/UpdateHookRegistry/9" title="Provides module updates versions handling." class="local">\Drupal\Core\Update\UpdateHookRegistry</a> @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->keyValueFactory
        ->method('get')
        ->with('system.schema')
        ->willReturn($this->keyValueStore);
}

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