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

testApiStopRuntime_DestroysThread_WhenRuntimeIsThread() public method

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