summaryrefslogtreecommitdiff
path: root/modules/gallery/tests/Database_Test.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/tests/Database_Test.php')
-rw-r--r--modules/gallery/tests/Database_Test.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/gallery/tests/Database_Test.php b/modules/gallery/tests/Database_Test.php
index fa9e5370..106062f5 100644
--- a/modules/gallery/tests/Database_Test.php
+++ b/modules/gallery/tests/Database_Test.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2012 Bharat Mediratta
+ * Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -147,6 +147,12 @@ class Database_Test extends Gallery_Unit_Test_Case {
$sql = str_replace("\n", " ", $sql);
$this->assert_same("UPDATE [test_tables] SET [name] = [Test Name] WHERE [1] = [1]", $sql);
}
+
+ function escape_for_like_test() {
+ // Note: literal double backslash is written as \\\
+ $this->assert_same('basic\_test', Database::escape_for_like("basic_test"));
+ $this->assert_same('\\\100\%\_test/', Database::escape_for_like('\100%_test/'));
+ }
}
class Database_Mock extends Database {