Kraken\_Unit\Promise\_Partial\PromiseCancelledPartial::testApiAlways_DoesNotSuppressCancellation_WhenHandlerReturnsNonPromise_ForCancelledPromise PHP Метод

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

    public function testApiAlways_DoesNotSuppressCancellation_WhenHandlerReturnsNonPromise_ForCancelledPromise()
    {
        $deferred = $this->createDeferred();
        $test = $this->getTest();
        $exception = new Exception();
        $mock = $test->createCallableMock();
        $mock->expects($test->once())->method('__invoke')->with($test->identicalTo($exception));
        $deferred->cancel($exception);
        $deferred->getPromise()->always(function () {
            return 1;
        })->then(null, null, $mock);
    }
PromiseCancelledPartial