diff options
author | Andrey Andreev <narf@devilix.net> | 2017-06-19 10:33:58 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2017-06-19 10:33:58 +0200 |
commit | 6c7a4266410070d30f8f6bcdf9c9e67f3d6478e3 (patch) | |
tree | f0aab8f6f5e781d5947b1a5553b6648eb7b7a4ab /tests/codeigniter/helpers/url_helper_test.php | |
parent | 2459285b91d6fc4f5099f9f597529cce1059cb33 (diff) |
[ci skip] 3.1.5 release
Diffstat (limited to 'tests/codeigniter/helpers/url_helper_test.php')
-rw-r--r-- | tests/codeigniter/helpers/url_helper_test.php | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/tests/codeigniter/helpers/url_helper_test.php b/tests/codeigniter/helpers/url_helper_test.php deleted file mode 100644 index 24823a634..000000000 --- a/tests/codeigniter/helpers/url_helper_test.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php - -class Url_helper_test extends CI_TestCase { - - public function set_up() - { - $this->helper('url'); - } - - 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)); - } - } - - // -------------------------------------------------------------------- - - 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')); - } - } - - // -------------------------------------------------------------------- - - public function test_prep_url() - { - $this->assertEquals('http://codeigniter.com', prep_url('codeigniter.com')); - $this->assertEquals('http://www.codeigniter.com', prep_url('www.codeigniter.com')); - } - - // -------------------------------------------------------------------- - - public function test_auto_link_url() - { - $strings = array( - 'www.codeigniter.com test' => '<a href="http://www.codeigniter.com">www.codeigniter.com</a> test', - 'This is my noreply@codeigniter.com test' => 'This is my noreply@codeigniter.com test', - '<br />www.google.com' => '<br /><a href="http://www.google.com">www.google.com</a>', - 'Download CodeIgniter at www.codeigniter.com. Period test.' => 'Download CodeIgniter at <a href="http://www.codeigniter.com">www.codeigniter.com</a>. Period test.', - 'Download CodeIgniter at www.codeigniter.com, comma test' => 'Download CodeIgniter at <a href="http://www.codeigniter.com">www.codeigniter.com</a>, comma test', - 'This one: ://codeigniter.com must not break this one: http://codeigniter.com' => 'This one: <a href="://codeigniter.com">://codeigniter.com</a> must not break this one: <a href="http://codeigniter.com">http://codeigniter.com</a>' - ); - - foreach ($strings as $in => $out) - { - $this->assertEquals($out, auto_link($in, 'url')); - } - } - - // -------------------------------------------------------------------- - - public function test_pull_675() - { - $strings = array( - '<br />www.google.com' => '<br /><a href="http://www.google.com">www.google.com</a>', - ); - - foreach ($strings as $in => $out) - { - $this->assertEquals($out, auto_link($in, 'url')); - } - } - -}
\ No newline at end of file |