Kraken\_Unit\Runtime\RuntimeModelTest::testApiStop_ResolvesPromise_WhenInvokedFromStateStopped PHP Method

testApiStop_ResolvesPromise_WhenInvokedFromStateStopped() public method

    public function testApiStop_ResolvesPromise_WhenInvokedFromStateStopped()
    {
        $runtime = $this->createModel();
        $states = [Runtime::STATE_STOPPED];
        foreach ($states as $state) {
            $runtime->setState($state);
            $callable = $this->createCallableMock();
            $callable->expects($this->once())->method('__invoke')->with($this->isType('string'));
            $runtime->stop()->then($callable, $this->expectCallableNever());
        }
    }
RuntimeModelTest