$container ->
register('lock', 'Drupal\Core\Lock\DatabaseLockBackend'
) ->
addArgument(new Reference('database'
));
} /**
* Tests setting and invalidating.
*
* @dataProvider providerTestInvalidCharacters
*/
public function testCacheCollector($cid,
$key,
$value) { $collector =
new CacheCollectorHelper($cid,
$this->container->
get('cache.default'
),
$this->container->
get('lock'
));
$this->
assertNull($collector->
get($key));
$collector->
set($key,
$value);
$this->
assertEquals($value,
$collector->
get($key));
$collector->
destruct();
// @todo Shouldn't this be empty after destruction?
$this->
assertEquals($value,
$collector->
get($key));
} /**
* Data provider for ::testCacheCollector().
*/