/** * Basic DBALite_Statement::fetchAll covered in DBALite_Driver_Common_Tests::queryAll * @depends testBindValue */ public function testFetchAllWithMode(DBALite_Statement $stmt) { $stmt->setFetchMode('assoc'); $stmt->reset(); $stmt->bindValue(1, 7); $stmt->execute(); $expected = array(array(7, 'Uncle Bob\'s Organic Dried Pears', 3, 7, '12 - 1 lb pkgs.', 30.0, 15, 10), array(14, 'Tofu', 6, 7, '40 - 100 g pkgs.', 23.25, 35, 0), array(28, 'Rössle Sauerkraut', 12, 7, '25 - 825 g cans', 45.6, 26, 0), array(51, 'Manjimup Dried Apples', 24, 7, '50 - 300 g pkgs.', 53.0, 20, 10), array(74, 'Longlife Tofu', 4, 7, '5 kg pkg.', 10.0, 4, 5)); $actual = $stmt->fetchAll('num'); $this->assertEquals($expected, $actual); return $stmt; }