public function testApiStart_RejectsPromise_WhenInvokedFromStateDestroyed()
{
$runtime = $this->createModel();
$states = [Runtime::STATE_DESTROYED];
foreach ($states as $state) {
$runtime->setState($state);
$callable = $this->createCallableMock();
$callable->expects($this->once())->method('__invoke')->with($this->isInstanceOf(RejectionException::class));
$runtime->start()->then($this->expectCallableNever(), $callable);
}
}