From e280b4fbecd1d9ea1a0ca2b55e3da2556f2c0940 Mon Sep 17 00:00:00 2001 From: pookey Date: Sat, 26 Jan 2008 21:43:56 +0000 Subject: [PATCH] test showing that using count() with enums does not work. --- tests/DataType/EnumTestCase.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/DataType/EnumTestCase.php b/tests/DataType/EnumTestCase.php index 07207fcaf..c93adb04e 100644 --- a/tests/DataType/EnumTestCase.php +++ b/tests/DataType/EnumTestCase.php @@ -56,7 +56,28 @@ class Doctrine_DataType_Enum_TestCase extends Doctrine_UnitTestCase } } + public function testParameterConversionInCount() + { + try { + $query = new Doctrine_Query($this->connection); + $ret = $query->parseQuery("FROM EnumTest WHERE EnumTest.status = 'open'") + ->count(); + $this->assertEqual($ret, 1); + } catch (Exception $e) { + $this->fail(); + } + try { + $query = new Doctrine_Query($this->connection); + $ret = $query->parseQuery("FROM EnumTest WHERE EnumTest.status = 'open'") + ->count(array('open')); + $this->assertEqual($ret, 1); + } catch (Exception $e) { + $this->fail(); + } + + + } public function testInAndNotIn() {