function it_set_initialization_callback_to_lazy_properties(LazyProperty $lazyProperty) { $entity = new EntityFake(); $proxy = new ProxyFake($entity, [$lazyProperty->getWrappedObject()]); $this->register($proxy); $lazyProperty->setInitializationCallback(Argument::type('Isolate\Framework\UnitOfWork\LazyObjects\InitializationCallback')) ->shouldHaveBeenCalled(); $this->isRegistered($entity)->shouldReturn(true); }