Greg Aker | 2c4b366 | 2011-08-21 16:28:06 -0500 | [diff] [blame] | 1 | <?php |
2 | |||||
3 | require_once(BASEPATH.'helpers/url_helper.php'); | ||||
4 | |||||
5 | class Url_helper_test extends CI_TestCase | ||||
6 | { | ||||
7 | public function test_url_title() | ||||
8 | { | ||||
9 | $words = array( | ||||
10 | 'foo bar /' => 'foo-bar', | ||||
11 | '\ testing 12' => 'testing-12' | ||||
12 | ); | ||||
13 | |||||
14 | foreach ($words as $in => $out) | ||||
15 | { | ||||
16 | $this->assertEquals($out, url_title($in, 'dash', TRUE)); | ||||
17 | } | ||||
18 | } | ||||
19 | |||||
20 | // -------------------------------------------------------------------- | ||||
21 | |||||
22 | } |