From 1eafe3d11782f819b8234371ded754fc0cb372b8 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 30 Nov 2007 13:30:38 -0500 Subject: [PATCH] Adding a testCondition() method to the API test * UnitTest/ApiTest.php --- UnitTest/ApiTest.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/UnitTest/ApiTest.php b/UnitTest/ApiTest.php index 2f75673..bf63976 100644 --- a/UnitTest/ApiTest.php +++ b/UnitTest/ApiTest.php @@ -68,8 +68,17 @@ class ApiTest extends PHPUnit_Framework_TestCase public function testCondition() { + $this->fixture->set('id', 4); + $this->fixture->set('atext', 'foo'); - $this->fixture->set('a') + $this->fixture->setCondition(); + $this->assertEquals('id = 4', $this->fixture->T_getCondition()); + + $this->fixture->setCondition(array('atext')); + $this->assertEquals("atext = 'foo'", $this->fixture->T_getCondition()); + + $this->fixture->setCondition('aint = 3'); + $this->assertEquals('aint = 3', $this->fixture->T_getCondition()); } } -- 2.43.5