Does anybody know how make the data returned be sensitive to the actual querying parameters involved? Every example, I've seen has conveniently excluded mocking the results for a query with a where clause. The one example that I did find completely ignores the where clause. It seems to entail that the queries that our regexes are matching against are fully qualified SQL. In my experience, this is not the case. There are '?' placeholders for anything in the query that is literal. It seems to be completely oblivious to the fact that these parts of the query are bound when $sth->execute is called.
Am I doing something wrong? It seems that this is a major oversight for the module if it doesn't have the ability to do query-sensitive results and would be appalled that anyone would say that the module allows you to have "fine-grained" control over the results.
Can anyone illucidate the subject for me. Until, then I'm going to hold out, hoping that I'm completely wrong about the behavior of this module. I want to be wrong because I just blew a day getting our application at work to not crash when I use Test::MockDBI.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.