From ba4aa5ec729d9b63608678c43ffcc67d57c980c5 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 16 Oct 2006 17:58:01 +0000 Subject: [PATCH] Added one more XMLDB test for find_sequence_name() Merged from MOODLE_17_STABLE --- admin/xmldb/actions/test/test.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/admin/xmldb/actions/test/test.class.php b/admin/xmldb/actions/test/test.class.php index a847effc63..96b1b09d35 100644 --- a/admin/xmldb/actions/test/test.class.php +++ b/admin/xmldb/actions/test/test.class.php @@ -721,6 +721,20 @@ class test extends XMLDBAction { $tests['rename table'] = $test; } + /// 41th test. Getting the PK sequence name for one table + if ($test->status) { + $table->setName('newnameforthetable'); + $test->sql = array(find_sequence_name($table)); + $test->status = find_sequence_name($table); + if (!$test->status) { + if (!$test->error = $db->ErrorMsg()) { //If no db errors, result is ok. Just the driver doesn't support this + $test->sql = array('not needed for this DB'); + $test->status = true; + } + } + $tests['find sequence name'] = $test; + } + /// TODO: Check here values of the inserted records to see that everything ha the correct value -- 2.39.5