Kraken\_Unit\Runtime\RuntimeManagerTest::testApiDestroyRuntime_DestroysProcess_WhenRuntimeIsProcess PHP Method

testApiDestroyRuntime_DestroysProcess_WhenRuntimeIsProcess() public method

    public function testApiDestroyRuntime_DestroysProcess_WhenRuntimeIsProcess()
    {
        $manager = $this->createRuntimeManager();
        $alias = 'alias';
        $flags = 'flags';
        $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('destroyProcess')->with($alias, $flags, $params)->will($this->returnValue(new PromiseFulfilled()));
        $callable = $this->createCallableMock();
        $callable->expects($this->once())->method('__invoke');
        $manager->destroyRuntime($alias, $flags, $params)->then($callable);
    }
RuntimeManagerTest