Kraken\_Unit\Promise\_Partial\PromiseFulfilledPartial::testApiAlways_RejectsPromise_WhenHandlerRejects_ForFulfilledPromise PHP Method

testApiAlways_RejectsPromise_WhenHandlerRejects_ForFulfilledPromise() public method

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