summaryrefslogtreecommitdiff
path: root/modules/gallery/tests
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-04-22 13:56:32 -0700
committerBharat Mediratta <bharat@menalto.com>2011-04-22 13:57:46 -0700
commit526859d9605d137ebe053ecbd80f46ca6a331194 (patch)
tree7bad7111918ba9223eda6d880950b7f6918f81b5 /modules/gallery/tests
parent5af74d4714005c565fc9550dbf1f0689c18429a7 (diff)
Do simple transliteration when converting filenames to slugs, but check
to see if the transliteration module is available and use a more complex transliteration if possible. Fixes #1668.
Diffstat (limited to 'modules/gallery/tests')
-rw-r--r--modules/gallery/tests/Item_Helper_Test.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gallery/tests/Item_Helper_Test.php b/modules/gallery/tests/Item_Helper_Test.php
index 4d5aed41..2fde7cc0 100644
--- a/modules/gallery/tests/Item_Helper_Test.php
+++ b/modules/gallery/tests/Item_Helper_Test.php
@@ -49,6 +49,10 @@ class Item_Helper_Test extends Gallery_Unit_Test_Case {
public function convert_filename_to_slug_test() {
$this->assert_equal("foo", item::convert_filename_to_slug("{[foo]}"));
$this->assert_equal("foo-bar", item::convert_filename_to_slug("{[foo!@#!$@#^$@($!(@bar]}"));
+ $this->assert_equal("english-text", item::convert_filename_to_slug("english text"));
+ $this->assert_equal("new-line", item::convert_filename_to_slug("new \n line"));
+ $this->assert_equal("foo-and-bar", item::convert_filename_to_slug("foo&bar"));
+ $this->assert_equal("special", item::convert_filename_to_slug("šṗëçîąļ"));
}
public function move_test() {