};
$container =
new Container();
$container->
set('computation_service',
$computationService);
$container->
set('cache_pool',
$pool);
$reverseContainer =
new ReverseContainer($container,
new ServiceLocator([]));
$msg = EarlyExpirationMessage::
create($reverseContainer,
$computationService,
$item,
$pool);
$handler =
new EarlyExpirationHandler($reverseContainer);
$handler($msg);
$this->
assertSame(123,
$pool->
get('foo',
$this->
fail(...
), 0.0,
$metadata));
$this->
assertGreaterThan(25,
$metadata['ctime'
]);
$this->
assertGreaterThan(time(),
$metadata['expiry'
]);
}}