summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/helpers/html_helper_test.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-09 21:24:46 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-09 21:24:46 +0200
commit99b782d8a3d92c4703a059cbd62e2f1e6fea689c (patch)
tree622bd77c72eb812e37d4b3816b93528679d71425 /tests/codeigniter/helpers/html_helper_test.php
parent1b60fda70ff1e1801c133575c530ef0a5a450029 (diff)
Cleanup and optimize helper tests for speed
Diffstat (limited to 'tests/codeigniter/helpers/html_helper_test.php')
-rw-r--r--tests/codeigniter/helpers/html_helper_test.php28
1 files changed, 12 insertions, 16 deletions
diff --git a/tests/codeigniter/helpers/html_helper_test.php b/tests/codeigniter/helpers/html_helper_test.php
index 28974b0f8..9a7bb48bf 100644
--- a/tests/codeigniter/helpers/html_helper_test.php
+++ b/tests/codeigniter/helpers/html_helper_test.php
@@ -6,16 +6,16 @@ class Html_helper_test extends CI_TestCase {
{
$this->helper('html');
}
-
+
// ------------------------------------------------------------------------
-
+
public function test_br()
{
$this->assertEquals('<br /><br />', br(2));
}
-
+
// ------------------------------------------------------------------------
-
+
public function test_heading()
{
$this->assertEquals('<h1>foobar</h1>', heading('foobar'));
@@ -23,7 +23,7 @@ class Html_helper_test extends CI_TestCase {
}
// ------------------------------------------------------------------------
-
+
public function test_Ul()
{
$expect = <<<EOH
@@ -35,11 +35,9 @@ class Html_helper_test extends CI_TestCase {
EOH;
$expect = ltrim($expect);
-
$list = array('foo', 'bar');
-
- $this->assertEquals($expect, ul($list));
+ $this->assertEquals(ltrim($expect), ul($list));
$expect = <<<EOH
<ul class="test">
@@ -51,13 +49,11 @@ EOH;
$expect = ltrim($expect);
- $list = array('foo', 'bar');
-
$this->assertEquals($expect, ul($list, 'class="test"'));
$this->assertEquals($expect, ul($list, array('class' => 'test')));
}
-
+
// ------------------------------------------------------------------------
public function test_NBS()
@@ -66,15 +62,15 @@ EOH;
}
// ------------------------------------------------------------------------
-
+
public function test_meta()
{
$this->assertEquals("<meta name=\"test\" content=\"foo\" />\n", meta('test', 'foo'));
-
+
$expect = "<meta name=\"foo\" content=\"\" />\n";
-
+
$this->assertEquals($expect, meta(array('name' => 'foo')));
-
+
}
-
+
} \ No newline at end of file