public function testGetShared()
{
$this->specify("Resolving shared service does now work correctly", function () {
$this->phDi->set('dateObject', function () {
$object = new \stdClass();
$object->date = microtime(true);
return $object;
});
$dateObject = $this->phDi->getShared('dateObject');
usleep(5000);
$dateObject2 = $this->phDi->getShared('dateObject');
expect($dateObject)->equals($dateObject2);
expect($dateObject->date)->equals($dateObject2->date);
});
}