diff options
author | Greg Aker <greg@gregaker.net> | 2011-08-21 23:28:06 +0200 |
---|---|---|
committer | Greg Aker <greg@gregaker.net> | 2011-08-21 23:28:06 +0200 |
commit | 2c4b36620828173f3caf83fc7f6146bccb3688f4 (patch) | |
tree | fc6d5d570b5e0eca81fab30a6c1becd47e2c6050 /tests/codeigniter/helpers | |
parent | d031ef79248bef6e188b6726682aac12b2fb8ff6 (diff) |
Adding url_helper unit test file. GO!
Diffstat (limited to 'tests/codeigniter/helpers')
-rw-r--r-- | tests/codeigniter/helpers/url_helper_test.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/codeigniter/helpers/url_helper_test.php b/tests/codeigniter/helpers/url_helper_test.php new file mode 100644 index 000000000..ea3fb0e4f --- /dev/null +++ b/tests/codeigniter/helpers/url_helper_test.php @@ -0,0 +1,22 @@ +<?php + +require_once(BASEPATH.'helpers/url_helper.php'); + +class Url_helper_test extends CI_TestCase +{ + public function test_url_title() + { + $words = array( + 'foo bar /' => 'foo-bar', + '\ testing 12' => 'testing-12' + ); + + foreach ($words as $in => $out) + { + $this->assertEquals($out, url_title($in, 'dash', TRUE)); + } + } + + // -------------------------------------------------------------------- + +}
\ No newline at end of file |