public function testApiStopRuntime_DestroysProcess_WhenRuntimeIsProcess()
{
$manager = $this->createRuntimeManager();
$alias = 'alias';
$params = ['param' => 'value'];
$thread = $manager->getThread();
$thread->expects($this->once())->method('existsThread')->will($this->returnValue(false));
$process = $manager->getProcess();
$process->expects($this->once())->method('existsProcess')->will($this->returnValue(true));
$process->expects($this->once())->method('stopProcess')->with($alias, $params)->will($this->returnValue(new PromiseFulfilled()));
$callable = $this->createCallableMock();
$callable->expects($this->once())->method('__invoke');
$manager->stopRuntime($alias, $params)->then($callable);
}