|
34 | 34 | use PDO; |
35 | 35 |
|
36 | 36 |
|
37 | | -class DataAccessTestCase extends DBALFunctionalTestCase |
| 37 | +class DataAccessTest extends DBALFunctionalTestCase |
38 | 38 | { |
39 | 39 | static private $generated = false; |
40 | 40 |
|
@@ -164,7 +164,7 @@ public function testPrepareWithFetchAllBoth() |
164 | 164 | $stmt->bindParam(2, $paramStr, PDO::PARAM_STR); |
165 | 165 | $result = $stmt->executeQuery(); |
166 | 166 |
|
167 | | - $rows = $result->fetchAllAssociative(); |
| 167 | + $rows = $result->fetchAll(PDO::FETCH_BOTH); |
168 | 168 | $rows[0] = array_change_key_case($rows[0], \CASE_LOWER); |
169 | 169 | $this->assertEquals(array('test_int' => 1, 'test_string' => 'foo', 0 => 1, 1 => 'foo'), $rows[0]); |
170 | 170 | } |
@@ -296,7 +296,7 @@ public function testFetchColumn() |
296 | 296 | $this->assertEquals(1, $testInt); |
297 | 297 |
|
298 | 298 | $sql = "SELECT test_int, test_string FROM fetch_table WHERE test_int = ? AND test_string = ?"; |
299 | | - $testString = $this->_conn->fetchOne($sql, array(1, 'foo')); |
| 299 | + $testString = $this->_conn->fetchColumn($sql, array(1, 'foo'), 1); |
300 | 300 |
|
301 | 301 | $this->assertEquals('foo', $testString); |
302 | 302 | } |
@@ -485,7 +485,7 @@ public function testFetchAllStyleColumn() |
485 | 485 | $this->refresh("fetch_table"); |
486 | 486 |
|
487 | 487 | $sql = "SELECT test_int FROM fetch_table ORDER BY test_int ASC"; |
488 | | - $rows = $this->_conn->executeQuery($sql)->fetchOne(); |
| 488 | + $rows = $this->_conn->executeQuery($sql)->fetchAll(PDO::FETCH_COLUMN); |
489 | 489 |
|
490 | 490 | $this->assertEquals(array(1, 10), $rows); |
491 | 491 | } |
|
0 commit comments