public function testApiFlushProcesses_FlushesProcesses_WhenFlagIsOtherThanDestroyKeep()
{
$flags = Runtime::DESTROY_FORCE;
$manager = $this->createProcessManager(['destroyProcess']);
$manager->expects($this->twice())->method('destroyProcess')->with($this->isType('string'), $flags)->will($this->returnValue(new PromiseFulfilled()));
$manager->allocateProcess($alias1 = 'alias1', $object1 = 'object1', 1);
$manager->allocateProcess($alias2 = 'alias2', $object2 = 'object2', 2);
$callable = $this->createCallableMock();
$callable->expects($this->once())->method('__invoke')->with($this->isType('string'));
$manager->flushProcesses($flags)->then($callable);
}