function StateTest::setUpStateWithMockStorage

Initializes the $state with mock key-value storage.

11 calls to StateTest::setUpStateWithMockStorage()
StateTest::testDeleteAfterGet in core/tests/Drupal/Tests/Core/State/StateTest.php
Tests both get() & delete() method.
StateTest::testDeleteMultiple in core/tests/Drupal/Tests/Core/State/StateTest.php
Tests both deleteMultiple() method.
StateTest::testGet in core/tests/Drupal/Tests/Core/State/StateTest.php
Tests both get() & getMultiple() method.
StateTest::testGetEmpty in core/tests/Drupal/Tests/Core/State/StateTest.php
Tests both get() & getMultiple() method.
StateTest::testGetMultiple in core/tests/Drupal/Tests/Core/State/StateTest.php
Tests getMultiple() method.

... See full list

File

core/tests/Drupal/Tests/Core/State/StateTest.php, line 46

Class

StateTest
Tests Drupal\Core\State\State.

Namespace

Drupal\Tests\Core\State

Code

protected function setUpStateWithMockStorage() : void {
  $this->keyValueStorage = $this->createMock(KeyValueStoreInterface::class);
  $this->doSetUpState();
}

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