Changeset 3642 for trunk/tests/DataType

Show
Ignore:
Timestamp:
01/26/08 21:43:56 (12 months ago)
Author:
pookey
Message:

test showing that using count() with enums does not work.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/DataType/EnumTestCase.php

    r3460 r3642  
    5757    } 
    5858 
    59  
     59    public function testParameterConversionInCount()  
     60    { 
     61        try { 
     62            $query = new Doctrine_Query($this->connection); 
     63            $ret = $query->parseQuery("FROM EnumTest WHERE EnumTest.status = 'open'") 
     64              ->count(); 
     65            $this->assertEqual($ret, 1); 
     66        } catch (Exception $e) { 
     67            $this->fail(); 
     68        } 
     69 
     70        try { 
     71            $query = new Doctrine_Query($this->connection); 
     72            $ret = $query->parseQuery("FROM EnumTest WHERE EnumTest.status = 'open'") 
     73              ->count(array('open')); 
     74            $this->assertEqual($ret, 1); 
     75        } catch (Exception $e) { 
     76            $this->fail(); 
     77        } 
     78 
     79 
     80    } 
    6081 
    6182    public function testInAndNotIn()