diff options
author | Eric Barnes <eric@ericlbarnes.com> | 2011-04-22 04:00:33 +0200 |
---|---|---|
committer | Eric Barnes <eric@ericlbarnes.com> | 2011-04-22 04:00:33 +0200 |
commit | 68286a4dcc1ed4d904ad992173c1b3621bf6fced (patch) | |
tree | dd24a9e0126058f9d3b0958244b85784f1a66223 /tests/codeigniter/helpers/html_helper_test.php | |
parent | b58aeaca9be4b342bb6d88138005fdc7138828b4 (diff) |
Reworked unit tests to match rest of framework and added a few more.
Diffstat (limited to 'tests/codeigniter/helpers/html_helper_test.php')
-rw-r--r-- | tests/codeigniter/helpers/html_helper_test.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/codeigniter/helpers/html_helper_test.php b/tests/codeigniter/helpers/html_helper_test.php index 8c0e53301..706874f9e 100644 --- a/tests/codeigniter/helpers/html_helper_test.php +++ b/tests/codeigniter/helpers/html_helper_test.php @@ -4,14 +4,25 @@ require_once(BASEPATH.'helpers/html_helper.php'); class Html_helper_test extends CI_TestCase { - public function testHeading() + + // ------------------------------------------------------------------------ + + public function test_br() + { + $this->assertEquals('<br /><br />', br(2)); + } + + // ------------------------------------------------------------------------ + + public function test_heading() { $this->assertEquals('<h1>foobar</h1>', heading('foobar')); + $this->assertEquals('<h2 class="bar">foobar</h2>', heading('foobar', 2, 'class="bar"')); } // ------------------------------------------------------------------------ - public function testUl() + public function test_Ul() { $expect = <<<EOH <ul> @@ -47,14 +58,14 @@ EOH; // ------------------------------------------------------------------------ - public function testNBS() + public function test_NBS() { $this->assertEquals(' ', nbs(3)); } // ------------------------------------------------------------------------ - public function testMeta() + public function test_meta() { $this->assertEquals("<meta name=\"test\" content=\"foo\" />\n", meta('test', 'foo')); |