Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
schmengler opened this issue Sep 26, 2017 · 3 comments
Closed

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

schmengler opened this issue Sep 26, 2017 · 3 comments
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@schmengler
Copy link
Contributor

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
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Sep 26, 2017
@orlangur orlangur changed the title 92 usages of expectException() with $message parameter 92 usages of expectException() with ignored $message parameter Sep 26, 2017
@okorshenko okorshenko added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Sep 26, 2017
@magento-engcom-team
Copy link
Contributor

@schmengler, thank you for your report.
We've created internal ticket(s) MAGETWO-80128 to track progress on the issue.

@okorshenko
Copy link
Contributor

Hi @schmengler
thank you for report and fix

@okorshenko okorshenko added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 3, 2017
@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

3 participants