Skip to content

ReplaceAssertArraySubsetRector always uses assertSame which may break tests. #3192

@sidux

Description

@sidux

Bug Report

Rector version: 0.8.x-dev@a2e11ba

In the example below you can see a case where tests will break, using assertSame in objects.

Minimal PHP Code Causing Issue

https://getrector.org/demo/80297aa6-27fb-421e-8a89-9e9f5c1deb56

Expected Behaviour

the old constraint was \PHPUnit\Framework\Constraint\ArraySubset::__construct(iterable $subset, bool $strict = false) we should take into account the strict param to choose between assertEquals or assertSame, using assertEquals by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions