Kraken\_Unit\Runtime\RuntimeModelTest::testApiStop_RejectsPromise_WhenInvokedFromStateCreatedOrDestroyed PHP Метод

testApiStop_RejectsPromise_WhenInvokedFromStateCreatedOrDestroyed() публичный Метод

    public function testApiStop_RejectsPromise_WhenInvokedFromStateCreatedOrDestroyed()
    {
        $runtime = $this->createModel();
        $states = [Runtime::STATE_CREATED, Runtime::STATE_DESTROYED];
        foreach ($states as $state) {
            $runtime->setState($state);
            $callable = $this->createCallableMock();
            $callable->expects($this->once())->method('__invoke')->with($this->isInstanceOf(RejectionException::class));
            $runtime->stop()->then($this->expectCallableNever(), $callable);
        }
    }
RuntimeModelTest