summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/MySqlShimTest.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/MySqlShimTest.php b/tests/MySqlShimTest.php
index 1a39ff3..44a3a4e 100644
--- a/tests/MySqlShimTest.php
+++ b/tests/MySqlShimTest.php
@@ -621,7 +621,7 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase
/**
* @dataProvider mysql_fetch_DataProvider
*/
- public function test_mysql_fetch($function, $results)
+ public function test_mysql_fetch($function, $results, $resultType = null)
{
$this->getConnection("shim_test");
@@ -631,7 +631,7 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(sizeof($results), mysql_num_rows($result));
$i = 0;
- while ($row = $function($result)) {
+ while ($row = $function($result, $resultType)) {
$this->assertEquals($results[$i], $row);
$i++;
}
@@ -936,7 +936,18 @@ class MySqlShimTest extends \PHPUnit_Framework_TestCase
return [
[
'function' => 'mysql_fetch_array',
- 'results' => $array
+ 'results' => $assoc,
+ 'resulttype' => MYSQL_ASSOC
+ ],
+ [
+ 'function' => 'mysql_fetch_array',
+ 'results' => $array,
+ 'resulttype' => MYSQL_BOTH
+ ],
+ [
+ 'function' => 'mysql_fetch_array',
+ 'results' => $numeric,
+ 'resulttype' => MYSQL_NUM
],
[
'function' => 'mysql_fetch_assoc',