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

testApiDestroy_ResolvesPromise_WhenInvokedFromStateDestroyed() public method

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