diff options
Diffstat (limited to 'tests/MySqlShimTest.php')
-rw-r--r-- | tests/MySqlShimTest.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/MySqlShimTest.php b/tests/MySqlShimTest.php index ea9b2c3..1a63aad 100644 --- a/tests/MySqlShimTest.php +++ b/tests/MySqlShimTest.php @@ -688,11 +688,20 @@ class MySqlShimTest extends \PHPUnit\Framework\TestCase if ($args !== array()) { array_unshift($args, null); + $this->expectWarningMessageMatches('@' . __FILE__ . ':' . (__LINE__ + 1) . '@'); call_user_func_array($function, $args); } + $this->expectWarningMessageMatches('@' . __FILE__ . ':' . (__LINE__ + 1) . '@'); call_user_func($function, null); } + public function test_mysql_check_valid_result_backtraces_here() + { + $this->expectWarning(); + $this->expectWarningMessage(__FUNCTION__ . "() expects parameter 1 to be resource, boolean given on " . __FILE__ . ':' . (__LINE__ + 1)); + \Dshafik\MySQL::checkValidResult(false, __FUNCTION__); + } + /** * @dataProvider mysql_fetch_DataProvider */ |