Skip to content

Validate array argument for promise-array related functions #35

Closed
@jsor

Description

@jsor

Reject all() / race() / any() / some() / map() / reduce() when called with a non-array.

all(null)
    ->otherwise(function(\InvalidArgumentException $e) {
        assertEquals('Expecting an array or a promise which resolves to an array, got NULL instead.' , $exception->getMessage());
    });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions