Kraken\_Unit\Promise\_Partial\ApiRejectPartial::testApiAlways_DoesNotSuppressRejection_WhenHandlerReturnsPromise PHP Method

testApiAlways_DoesNotSuppressRejection_WhenHandlerReturnsPromise() public method

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