diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-10 18:49:29 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-10 18:49:29 -0700 |
commit | 58b21e909d8ba628ddb8a19e732989821abb0283 (patch) | |
tree | 508fed676f58eee4ef7ad565be70d2ed16521af7 /modules/gallery/tests/Item_Helper_Test.php | |
parent | 26d0af45eabe962c5366cb1e95de7e252b831796 (diff) |
Change the pattern used to convert the file name to a title. Fixes ticket#1061
Diffstat (limited to 'modules/gallery/tests/Item_Helper_Test.php')
-rw-r--r-- | modules/gallery/tests/Item_Helper_Test.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gallery/tests/Item_Helper_Test.php b/modules/gallery/tests/Item_Helper_Test.php index 4771b11a..00229973 100644 --- a/modules/gallery/tests/Item_Helper_Test.php +++ b/modules/gallery/tests/Item_Helper_Test.php @@ -41,6 +41,11 @@ class Item_Helper_Test extends Gallery_Unit_Test_Case { ORM::factory("item")->viewable()->where("id", "=", $item->id)->count_all()); } + public function convert_filename_to_title_test() { + $this->assert_equal("foo", item::convert_filename_to_title("foo.jpg")); + $this->assert_equal("foo.bar", item::convert_filename_to_title("foo.bar.jpg")); + } + 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]}")); |