Kraken\_Unit\Promise\_Partial\ApiCancelPartial::testApiCancel_InvokesDoneCancellationHandler PHP Method

testApiCancel_InvokesDoneCancellationHandler() public method

    public function testApiCancel_InvokesDoneCancellationHandler()
    {
        $deferred = $this->createDeferred();
        $test = $this->getTest();
        $mock = $test->createCallableMock();
        $mock->expects($test->once())->method('__invoke')->with($test->identicalTo(1));
        $test->assertNull($deferred->getPromise()->done(null, null, $mock));
        $deferred->cancel(1);
    }