Changeset 4528

Show
Ignore:
Timestamp:
06/20/08 17:30:57 (13 months ago)
Author:
guilhermeblanco
Message:

Added failing test.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/tests/Ticket/1133TestCase.php

    r4519 r4528  
    5151                ->innerJoin('f.Bar b ON b.id = ?', $foo->Bar->id) 
    5252                ->addWhere('f.name = ?', 'test'); 
    53          
     53 
    5454        $this->assertEqual($q->count(), 1); 
    5555    } 
     56 
     57    public function testTest2() 
     58    { 
     59        $foo = new Ticket_1133_Foo(); 
     60        $foo->name = 'test'; 
     61        $foo->Bar->name = 'test2'; 
     62        $foo->save(); 
     63 
     64        $q = Doctrine_Query::create() 
     65                ->from('Ticket_1133_Foo f') 
     66                ->innerJoin('f.Bar b') 
     67                ->addWhere('b.name = ?', 'test2') 
     68                ->limit(1) 
     69                ->offset(1); 
     70        echo $q->getSqlQuery() . '<br />'; 
     71        echo $q->getCountQuery() . '<br />'; 
     72 
     73        $this->assertEqual($q->count(), $q->execute()->count()); 
     74    } 
     75 
    5676} 
    5777