Timeline for How to unit test Exceptions with PHPUnit?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 8, 2018 at 13:20 | comment | added | Kamafeather | Exactly. Take a look at dotnetCarpenter's comment for updated guidelines. | |
Oct 15, 2018 at 20:07 | history | edited | danronmoon | CC BY-SA 4.0 |
Spelling
|
May 24, 2013 at 12:22 | history | edited | Prof. Falken | CC BY-SA 3.0 |
added 3 characters in body
|
Mar 13, 2013 at 15:36 | comment | added | TeaPow |
You can also use $this->setExpectedException('ExceptionTypeGoesHere') at the top of your test method, as well as the two listed above. I think this is the cleanest approach.
|
|
Jan 10, 2011 at 15:05 | vote | accept | André | ||
Jan 10, 2011 at 12:45 | history | edited | edorian | CC BY-SA 2.5 |
added 36 characters in body
|
Jan 10, 2011 at 12:37 | history | answered | edorian | CC BY-SA 2.5 |