diff options
author | Davey Shafik <me@daveyshafik.com> | 2020-10-25 17:30:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-25 17:30:14 -0700 |
commit | 033ec6b1e3c07276ad801396e39c1a783fd9105b (patch) | |
tree | fe1e960b3ff08394151b268618a2aab4c9d0c0c0 /tests/MySqlShimTest.php | |
parent | 697e0eb466aa474ff054d7e6908ab873d77dcdcf (diff) | |
parent | 709444274c9e87383c3728ee347607e4ae6c7906 (diff) | |
download | php7-mysql-shim-033ec6b1e3c07276ad801396e39c1a783fd9105b.zip php7-mysql-shim-033ec6b1e3c07276ad801396e39c1a783fd9105b.tar.gz php7-mysql-shim-033ec6b1e3c07276ad801396e39c1a783fd9105b.tar.bz2 |
Merge pull request #54 from SWsistemas/master
Adds backtrace for illegal argument supplied warning
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 */ |