Kraken\_Unit\Promise\_Partial\PromiseRejectedPartial::testApiAlways_DoesNotSuppressRejection_WhenHandlerReturnsPromise_ForRejectedPromise PHP Method

testApiAlways_DoesNotSuppressRejection_WhenHandlerReturnsPromise_ForRejectedPromise() public method

    public function testApiAlways_DoesNotSuppressRejection_WhenHandlerReturnsPromise_ForRejectedPromise()
    {
        $deferred = $this->createDeferred();
        $test = $this->getTest();
        $exception = new Exception();
        $mock = $test->createCallableMock();
        $mock->expects($test->once())->method('__invoke')->with($test->identicalTo($exception));
        $deferred->reject($exception);
        $deferred->getPromise()->always(function () {
            return Promise::doResolve(1);
        })->then(null, $mock);
    }
PromiseRejectedPartial