diff options
author | Andrey Andreev <narf@devilix.net> | 2017-09-25 18:44:51 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2017-09-25 18:44:51 +0200 |
commit | e76217041ddcae80f11b50b44a7d409b6722ad40 (patch) | |
tree | 6f7dd444bfc5b4206a6e07169ad3c05b9b63fa4d /tests/codeigniter/helpers/html_helper_test.php | |
parent | 9c07c3697bab0bf43e10daf59068497dd3a0a9fd (diff) | |
parent | cf728703b5852591c160cbd9566a0e508dd5759a (diff) |
Merge branch '3.1-stable'
Diffstat (limited to 'tests/codeigniter/helpers/html_helper_test.php')
-rw-r--r-- | tests/codeigniter/helpers/html_helper_test.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/codeigniter/helpers/html_helper_test.php b/tests/codeigniter/helpers/html_helper_test.php index d66ad895c..3cf1016ec 100644 --- a/tests/codeigniter/helpers/html_helper_test.php +++ b/tests/codeigniter/helpers/html_helper_test.php @@ -40,6 +40,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 @@ -89,4 +103,4 @@ EOH; } -}
\ No newline at end of file +} |