예제 #1
0
 public function testFetchAllWithGeneratorAssocReturnsGeneratorOfRowsWithNoNumericKeys()
 {
     $sql = 'SELECT * FROM dewdrop_test_fruits';
     foreach ($this->db->fetchAllWithGenerator($sql, [], Adapter::ARRAY_A) as $row) {
         $this->assertInternalType('array', $row);
         $rowKeys = array_keys($row);
         $this->assertSame('dewdrop_test_fruit_id', current($rowKeys));
         foreach ($rowKeys as $key) {
             $this->assertInternalType('string', $key);
         }
     }
 }