$container =
new Container();
$container->
set('computation_service',
$computationService);
$container->
set('cache_pool',
$pool);
$reverseContainer =
new ReverseContainer($container,
new ServiceLocator([]));
$msg = EarlyExpirationMessage::
create($reverseContainer,
[$computationService, '__invoke'
],
$item,
$pool);
$this->
assertSame('cache_pool',
$msg->
getPool());
$this->
assertSame($pool,
$msg->
findPool($reverseContainer));
$this->
assertSame('foo',
$msg->
getItem()->
getKey());
$this->
assertNull($msg->
getItem()->
get());
$this->
assertSame(234,
$item->
get());
$this->
assertSame(['@computation_service', '__invoke'
],
$msg->
getCallback());
$this->
assertSame([$computationService, '__invoke'
],
$msg->
findCallback($reverseContainer));
$msg = EarlyExpirationMessage::
create($reverseContainer,
$computationService,
$item,
$pool);
$this->
assertSame('@computation_service',
$msg->
getCallback());