Timeline for PHPUnit assert that an exception was thrown?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 18, 2022 at 20:17 | comment | added | Joel Mellon | This is great. I was asserting my expectation of two exceptions, and phpunit's output only showed one assertion. | |
Oct 23, 2015 at 1:42 | history | edited | hejdav | CC BY-SA 3.0 |
added 129 characters in body
|
Jul 27, 2015 at 11:40 | comment | added | hejdav |
The asertException method is not part of original PHPUnit. You must inherit the PHPUnit_Framework_TestCase class and add method linked in post above manually. Your test cases will then inherit this inherited class.
|
|
Jul 22, 2015 at 8:34 | comment | added | physicalattraction |
Which PHPUnit are you using? I am using PHPUnit 4.7.5, and there assertException is not defined. I also cannot find it in the PHPUnit manual.
|
|
Apr 29, 2014 at 22:19 | review | Late answers | |||
Apr 29, 2014 at 22:20 | |||||
Apr 29, 2014 at 22:00 | history | answered | hejdav | CC BY-SA 3.0 |