Skip to content

ArraySubsetConstraint use invalid cast to array #2568

Closed
@bburnichon

Description

@bburnichon
Q A
PHPUnit version 5.7
PHP version all
Installation Method Composer / PHAR
        //type cast $other & $this->subset as an array to allow
        //support in standard array functions.
        if ($other instanceof ArrayAccess) {
            $other = (array) $other;
        }

This actually only works with ArrayObject instances. See https://3v4l.org/ti4aY for simple implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions