use Drupal\Core\Cache\MemoryBackend;
use Drupal\Core\KeyValueStore\KeyValueMemoryFactory;
-use Drupal\Core\Lock\NullLockBackend;
use Drupal\Core\State\State;
use Drupal\Core\Cache\Cache;
$test_element = [
'#cache' => [
'keys' => ['parent'],
- 'tags' => ['yar', 'har']
+ 'tags' => ['yar', 'har'],
],
'#markup' => 'parent',
'child' => [
'tags' => ['fiddle', 'dee'],
],
'#attached' => [
- 'library' => ['foo/bar']
+ 'library' => ['foo/bar'],
],
'#markup' => '',
- ]
+ ],
],
];
$expected_cache_items = [
$this->setupMemoryCache();
// Mock the State service.
- $memory_state = new State(new KeyValueMemoryFactory(), new MemoryBackend('test'), new NullLockBackend());
+ $memory_state = new State(new KeyValueMemoryFactory());
\Drupal::getContainer()->set('state', $memory_state);
$this->controllerResolver->expects($this->any())
->method('getControllerFromDefinition')