/** @test */ public function shouldCallFactoryIfThenIsInvoked() { $factory = $this->createCallableMock(); $factory->expects($this->once())->method('__invoke'); When::lazy($factory)->then(); }