Skip to content

92 usages of expectException() with ignored $message parameter #11059

@schmengler

Description

@schmengler

It seems like during the transition to PHPUnit 6, setExpectedException($class, $message) has been bulk replaced by expectExcpeption($class, $message)

But the new expectException() method only takes one parameter, namely the exception class. To check the message as well, a second method is needed: expectExceptionMessage()

Preconditions

  1. Magento 2.2

Steps to reproduce

  1. Change an exception message that should be covered by a test

Expected result

  1. The test should fail

Actual result

  1. The test passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions