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

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

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