public function shouldCallFactoryIfThenIsInvoked() { $factory = $this->createCallableMock(); $factory->expects($this->once())->method('__invoke'); $p = new LazyPromise($factory); $p->then(); }