diff options
Diffstat (limited to 'tests/codeigniter/helpers')
-rw-r--r-- | tests/codeigniter/helpers/array_helper_test.php | 8 | ||||
-rw-r--r-- | tests/codeigniter/helpers/inflector_helper_test.php | 2 | ||||
-rw-r--r-- | tests/codeigniter/helpers/url_helper_test.php | 12 |
3 files changed, 16 insertions, 6 deletions
diff --git a/tests/codeigniter/helpers/array_helper_test.php b/tests/codeigniter/helpers/array_helper_test.php index 5a9958971..b2409c330 100644 --- a/tests/codeigniter/helpers/array_helper_test.php +++ b/tests/codeigniter/helpers/array_helper_test.php @@ -31,15 +31,15 @@ class Array_helper_test extends CI_TestCase { $this->assertEquals('my string', random_element('my string')); // Test sending an array - $this->assertEquals(TRUE, in_array(random_element($this->my_array), $this->my_array)); + $this->assertContains(random_element($this->my_array), $this->my_array); } // ------------------------------------------------------------------------ public function test_elements() { - $this->assertEquals(TRUE, is_array(elements('test', $this->my_array))); - $this->assertEquals(TRUE, is_array(elements('foo', $this->my_array))); + $this->assertInternalType('array', elements('test', $this->my_array)); + $this->assertInternalType('array', elements('foo', $this->my_array)); } -}
\ No newline at end of file +} diff --git a/tests/codeigniter/helpers/inflector_helper_test.php b/tests/codeigniter/helpers/inflector_helper_test.php index 4a1e64fae..8c4f9e51f 100644 --- a/tests/codeigniter/helpers/inflector_helper_test.php +++ b/tests/codeigniter/helpers/inflector_helper_test.php @@ -30,7 +30,7 @@ class Inflector_helper_test extends CI_TestCase { $strs = array( 'telly' => 'tellies', 'smelly' => 'smellies', - 'abjectness' => 'abjectnesses', // ref : http://en.wiktionary.org/wiki/abjectnesses + 'abjectness' => 'abjectnesses', // ref : https://en.wiktionary.org/wiki/abjectnesses 'smell' => 'smells', 'witch' => 'witches', 'equipment' => 'equipment' diff --git a/tests/codeigniter/helpers/url_helper_test.php b/tests/codeigniter/helpers/url_helper_test.php index c5b0f80b7..5f936568b 100644 --- a/tests/codeigniter/helpers/url_helper_test.php +++ b/tests/codeigniter/helpers/url_helper_test.php @@ -63,7 +63,8 @@ class Url_helper_test extends CI_TestCase { '<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>' + '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>', + 'Trailing slash: https://codeigniter.com/ fubar' => 'Trailing slash: <a href="https://codeigniter.com/">https://codeigniter.com/</a> fubar' ); foreach ($strings as $in => $out) @@ -86,4 +87,13 @@ class Url_helper_test extends CI_TestCase { } } + // -------------------------------------------------------------------- + + public function test_issue_5331() + { + $this->assertEquals( + 'this is some text that includes '.safe_mailto('www.email@domain.com').' which is causing an issue', + auto_link('this is some text that includes www.email@domain.com which is causing an issue') + ); + } } |