in reply to How can I make DBI's prepare() fail? [MySQL]
I'm just testing that I've got exceptions for all the things which can go wrong.This seems like a good candidate for Mock objects. Instead of a true DBI object, create an object that would fail the first prepare call it gets and pass it to your code in your tests.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I make DBI's prepare() fail? [MySQL]
by Cody Fendant (Hermit) on Dec 23, 2018 at 10:11 UTC | |
by markong (Pilgrim) on Dec 23, 2018 at 13:53 UTC | |
by Anonymous Monk on Dec 23, 2018 at 12:09 UTC | |
by Cody Fendant (Hermit) on Apr 04, 2019 at 22:51 UTC |