summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/helpers/url_helper_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter/helpers/url_helper_test.php')
-rw-r--r--tests/codeigniter/helpers/url_helper_test.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/codeigniter/helpers/url_helper_test.php b/tests/codeigniter/helpers/url_helper_test.php
index ea3fb0e4f..b5384eaef 100644
--- a/tests/codeigniter/helpers/url_helper_test.php
+++ b/tests/codeigniter/helpers/url_helper_test.php
@@ -10,13 +10,25 @@ class Url_helper_test extends CI_TestCase
'foo bar /' => 'foo-bar',
'\ testing 12' => 'testing-12'
);
-
+
foreach ($words as $in => $out)
{
$this->assertEquals($out, url_title($in, 'dash', TRUE));
- }
+ }
}
// --------------------------------------------------------------------
+ public function test_url_title_extra_dashes()
+ {
+ $words = array(
+ '_foo bar_' => 'foo_bar',
+ '_What\'s wrong with CSS?_' => 'Whats_wrong_with_CSS'
+ );
+
+ foreach ($words as $in => $out)
+ {
+ $this->assertEquals($out, url_title($in, 'underscore'));
+ }
+ }
} \ No newline at end of file