Ejemplo n.º 1
0
 public function testSelectHaving()
 {
     //SQLite doesn't need different test from 5.3
     if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
         return parent::testSelectHaving();
     }
     $select = $this->_selectHaving();
     $stmt = $this->_db->query($select);
     $result = $stmt->fetchAll();
     $bugs_products = $this->_db->quoteIdentifier('zfbugs_products');
     $bug_id = $this->_db->quoteIdentifier('bug_id');
     $key = "{$bugs_products}.{$bug_id}";
     $this->assertEquals(2, count($result));
     $this->assertEquals(1, $result[0][$key]);
     $this->assertEquals(3, $result[0]['thecount']);
 }