[limb-svn] r6936 - in 3.x/trunk/limb/dbal/tests/cases/non-driver: . criteria

svn at limb-project.com svn at limb-project.com
Tue Apr 15 10:49:38 MSD 2008


Author: pachanga
Date: 2008-04-15 10:49:37 +0400 (Tue, 15 Apr 2008)
New Revision: 6936
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6936

Modified:
   3.x/trunk/limb/dbal/tests/cases/non-driver/criteria/lmbSQLCriteriaTest.class.php
   3.x/trunk/limb/dbal/tests/cases/non-driver/lmbSimpleDbTest.class.php
Log:
-- adding tests for new functionality

Modified: 3.x/trunk/limb/dbal/tests/cases/non-driver/criteria/lmbSQLCriteriaTest.class.php
===================================================================
--- 3.x/trunk/limb/dbal/tests/cases/non-driver/criteria/lmbSQLCriteriaTest.class.php	2008-04-15 06:40:49 UTC (rev 6935)
+++ 3.x/trunk/limb/dbal/tests/cases/non-driver/criteria/lmbSQLCriteriaTest.class.php	2008-04-15 06:49:37 UTC (rev 6936)
@@ -169,6 +169,17 @@
     $this->assertEqual($criteria->toStatementString(), "1 = 1");
   }
 
+  function testObjectifyNotSupportedArrayFormatException()
+  {
+    try
+    {
+      //actually this format could be useful as well...
+      $criteria = lmbSQLCriteria :: objectify(array('id' => 1));
+      $this->assertTrue(false);
+    }
+    catch(lmbDbException $e){}
+  }
+
   function testPassRawCriteriaToConstructor()
   {
     $criteria = new lmbSQLCriteria('2 = 2');

Modified: 3.x/trunk/limb/dbal/tests/cases/non-driver/lmbSimpleDbTest.class.php
===================================================================
--- 3.x/trunk/limb/dbal/tests/cases/non-driver/lmbSimpleDbTest.class.php	2008-04-15 06:40:49 UTC (rev 6935)
+++ 3.x/trunk/limb/dbal/tests/cases/non-driver/lmbSimpleDbTest.class.php	2008-04-15 06:49:37 UTC (rev 6936)
@@ -174,6 +174,17 @@
     $this->assertEqual($records->count(), 1);
   }
 
+  function testExecute()
+  {
+    $this->db->insert('test_db_table', array('title' =>  'wow', 'description' => 'description'));
+
+    $this->assertEqual($this->db->select('test_db_table')->count(), 1);
+
+    $this->db->execute("DELETE FROM test_db_table");
+
+    $this->assertEqual($this->db->select('test_db_table')->count(), 0);
+  }
+
   function testQuote()
   {
      $this->assertEqual($this->db->quote('foo'), $this->conn->quoteIdentifier('foo'));



More information about the limb-svn mailing list