React\Promise\FunctionRaceTest::shouldNotCancelOtherPendingInputArrayPromisesIfOnePromiseFulfills PHP Метод

shouldNotCancelOtherPendingInputArrayPromisesIfOnePromiseFulfills() публичный Метод

    public function shouldNotCancelOtherPendingInputArrayPromisesIfOnePromiseFulfills()
    {
        $mock = $this->createCallableMock();
        $mock->expects($this->never())->method('__invoke');
        $deferred = new Deferred($mock);
        $deferred->resolve();
        $mock2 = $this->getMockBuilder('React\\Promise\\CancellablePromiseInterface')->getMock();
        $mock2->expects($this->never())->method('cancel');
        race([$deferred->promise(), $mock2])->cancel();
    }