function StateTest::testGetMultipleStaticCache
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/State/StateTest.php \Drupal\Tests\Core\State\StateTest::testGetMultipleStaticCache()
Tests getMultiple() method.
Here with the help of testGetMultiple() function, testing the multiple key value again.
Attributes
#[Depends('testGetMultiple')]
Parameters
\Drupal\Core\State\State $state: The tested state.
File
-
core/
tests/ Drupal/ Tests/ Core/ State/ StateTest.php, line 179
Class
- StateTest
- Tests Drupal\Core\State\State.
Namespace
Drupal\Tests\Core\StateCode
public function testGetMultipleStaticCache(State $state) : void {
$keys = [
'key1',
'key2',
'key3',
];
$values = [
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3',
];
$this->keyValueStorage
->expects($this->never())
->method('getMultiple');
$this->assertEquals($values, $state->getMultiple($keys));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.