Skip to content

fix: incorrect toMatchArray expectation message#1342

Closed
i906 wants to merge 2 commits intopestphp:4.xfrom
i906:match-array-fix
Closed

fix: incorrect toMatchArray expectation message#1342
i906 wants to merge 2 commits intopestphp:4.xfrom
i906:match-array-fix

Conversation

@i906
Copy link
Copy Markdown

@i906 i906 commented Jan 20, 2025

What:

  • Bug Fix
  • New Feature

Description:

Fixes incorrect toMatchArray expectation message.

Test:

expect($this->user)->toMatchArray([
    'id' => 1,
    'email' => 'enunomaduro@gmall.com',
]);

Before:

Failed asserting that an array has a key 'id' with the value 1.
Failed asserting that two strings are equal.
Expected :'enunomaduro@gmall.com'
Actual   :'enunomaduro@gmail.com'

After:

Failed asserting that an array has a key 'email' with the value 'enunomaduro@gmail.com'.
Failed asserting that two strings are equal.
Expected :'enunomaduro@gmall.com'
Actual   :'enunomaduro@gmail.com'

Related:

#583

@nunomaduro nunomaduro changed the base branch from 3.x to 4.x July 26, 2025 03:16
@nunomaduro nunomaduro closed this Jul 26, 2025
@nunomaduro
Copy link
Copy Markdown
Member

this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants