public function testApiCommand_FulfillsOnDestroyEvent()
{
$command = $this->createCommand();
$runtime = $this->createRuntime(['destroy']);
$runtime->expects($this->once())->method('destroy')->will($this->returnCallback(function () use($runtime) {
$runtime->emit('destroy');
return new PromiseFulfilled();
}));
$this->callProtectedMethod($command, 'command', [])->then($this->expectCallableOnce());
}