summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStefan Andres Charsley <[email protected]>2014-01-12 21:36:37 +1300
committerSimon Holywell <[email protected]>2014-04-26 13:27:54 +0100
commit211fe4d960e465d01dc80eed7c4168c11bca6cbd (patch)
tree0b644e3c694eeb0d3ae3fdf47ecf25f08e59064b /test
parentf70b50e308092c15d446f4e6377238badf6dee9c (diff)
FIX: Added parameter array checking
Added debug code to see why it's failing.
Diffstat (limited to 'test')
-rw-r--r--test/bootstrap.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/bootstrap.php b/test/bootstrap.php
index 18ae16b..90d38c4 100644
--- a/test/bootstrap.php
+++ b/test/bootstrap.php
@@ -27,7 +27,12 @@ class MockPDOStatement extends PDOStatement {
if (preg_match_all('/"[^"\\\\]*(?:\\?)[^"\\\\]*"|\'[^\'\\\\]*(?:\\?)[^\'\\\\]*\'|(\\?)/', $this->statement, $m)) {
$count = count($m);
for ($i = 0; $i < $count; $i++) {
- if ($params[$i] == NULL) throw new Exception('Incorrect parameter count.');
+ if ($params[$i] == NULL) {
+ ob_start();
+ var_dump($m, $params);
+ $output = ob_get_clean();
+ throw new Exception('Incorrect parameter count. Expected ' . $count . ' got ' . count($params) . '.\n' . $output);
+ }
}
}
}