Kraken\_Unit\Promise\_Partial\FunctionAnyPartial::testApiAny_RejectsPromise_WithEmptyInputArray PHP Метод

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

    public function testApiAny_RejectsPromise_WithEmptyInputArray()
    {
        $test = $this->getTest();
        $mock = $test->createCallableMock();
        $mock->expects($test->once())->method('__invoke')->with($test->callback(function ($exception) {
            return $exception instanceof UnderflowException && 'Input array must contain at least 1 items but contains only 0 items.' === $exception->getMessage();
        }));
        Promise::any([])->then($test->expectCallableNever(), $mock);
    }