Kraken\_Unit\Promise\_Partial\FunctionSomePartial::testApiSome_CancelsPendingInputArrayPromises_IfEnoughPromisesFulfill PHP 메소드

testApiSome_CancelsPendingInputArrayPromises_IfEnoughPromisesFulfill() 공개 메소드

    public function testApiSome_CancelsPendingInputArrayPromises_IfEnoughPromisesFulfill()
    {
        $test = $this->getTest();
        $mock = $test->createCallableMock();
        $mock->expects($test->never())->method('__invoke');
        $deferred = new Deferred($mock);
        $deferred->resolve();
        $mock2 = $test->getMock(PromiseInterface::class);
        $mock2->expects($test->once())->method('cancel');
        Promise::some([$deferred->getPromise(), $mock2], 1);
    }