diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-02-07 08:28:32 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-02-07 08:28:32 -0800 |
commit | adac97b5372322be5154996974a6496198105d16 (patch) | |
tree | 5f06f49106066b9b31782910286313ff29b539a5 /modules/gallery/tests | |
parent | 2c3c126aafaa4d7ed86075927887636042117a1c (diff) |
Add prefix support for the target of RENAME TABLE.
Diffstat (limited to 'modules/gallery/tests')
-rw-r--r-- | modules/gallery/tests/Database_Test.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gallery/tests/Database_Test.php b/modules/gallery/tests/Database_Test.php index 861f7bba..730785e2 100644 --- a/modules/gallery/tests/Database_Test.php +++ b/modules/gallery/tests/Database_Test.php @@ -130,6 +130,13 @@ class Database_Test extends Gallery_Unit_Test_Case { $this->assert_same($expected, $sql); } + function prefix_replacement_for_rename_table_test() { + $db = Database::instance("mock"); + $this->assert_same( + "RENAME TABLE g_test TO g_new_test", + $db->add_table_prefixes("RENAME TABLE {test} TO {new_test}")); + } + function prefix_no_replacement_test() { $sql = db::build("mock") ->from("test_tables") |