mysql comparison weirdness finally detected
authorPetr Skoda <skodak@moodle.org>
Mon, 4 Oct 2010 08:21:53 +0000 (08:21 +0000)
committerPetr Skoda <skodak@moodle.org>
Mon, 4 Oct 2010 08:21:53 +0000 (08:21 +0000)
lib/dml/simpletest/testdml.php

index 9249fcf..1c32098 100755 (executable)
@@ -3056,6 +3056,9 @@ class dml_test extends UnitTestCase {
         $this->assertEqual(count($DB->get_records_sql($sql, array("1"))), 1);
         $this->assertEqual(count($DB->get_records_sql($sql, array(10))), 0);
         $this->assertEqual(count($DB->get_records_sql($sql, array("10"))), 0);
+        $DB->insert_record($tablename, array('course' => 7, 'content' => 'xx', 'name'=>'1abc'));
+        $this->assertEqual(count($DB->get_records_sql($sql, array(1))), 1);
+        $this->assertEqual(count($DB->get_records_sql($sql, array("1"))), 1);
     }
 
     function test_onelevel_commit() {