Changeset 4035

Show
Ignore:
Timestamp:
03/19/08 04:58:51 (16 months ago)
Author:
jwage
Message:

Added failing test for aggregate with comma in it in the groupby

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.10/tests/RecordTestCase.php

    r3930 r4035  
    894894        $this->assertEqual(count($user->Address), 1); 
    895895    } 
     896     
     897    public function testAggregateWithCommaGroupBy() 
     898    { 
     899        try { 
     900            $query = Doctrine_Query::create()->from('EntityAddress e')->groupby('COALESCE(e.user_id, e.address_id)'); 
     901            $this->assertEqual($query->getSql(), 'SELECT e.user_id AS e__user_id, e.address_id AS e__address_id FROM entity_address e GROUP BY COALESCE(e.user_id, e.address_id)'); 
     902        } catch (Exception $e) { 
     903            $this->fail($e->getMessage()); 
     904        } 
     905    } 
    896906}