diff options
Diffstat (limited to 'tests/codeigniter/helpers/html_helper_test.php')
-rw-r--r-- | tests/codeigniter/helpers/html_helper_test.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/codeigniter/helpers/html_helper_test.php b/tests/codeigniter/helpers/html_helper_test.php index 5565e011b..3ca23e015 100644 --- a/tests/codeigniter/helpers/html_helper_test.php +++ b/tests/codeigniter/helpers/html_helper_test.php @@ -33,6 +33,20 @@ class Html_helper_test extends CI_TestCase { // ------------------------------------------------------------------------ + public function test_img() + { + $this->ci_set_config('base_url', 'http://localhost/'); + $this->assertEquals('<img src="http://localhost/test" alt="" />', img("test")); + $this->assertEquals('<img src="data:foo/bar,baz" alt="" />', img("data:foo/bar,baz")); + $this->assertEquals('<img src="http://localhost/data://foo" alt="" />', img("data://foo")); + $this->assertEquals('<img src="//foo.bar/baz" alt="" />', img("//foo.bar/baz")); + $this->assertEquals('<img src="http://foo.bar/baz" alt="" />', img("http://foo.bar/baz")); + $this->assertEquals('<img src="https://foo.bar/baz" alt="" />', img("https://foo.bar/baz")); + $this->assertEquals('<img src="ftp://foo.bar/baz" alt="" />', img("ftp://foo.bar/baz")); + } + + // ------------------------------------------------------------------------ + public function test_Ul() { $expect = <<<EOH |