summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/helpers/html_helper_test.php
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-07-31 15:41:01 +0200
committerdchill42 <dchill42@gmail.com>2012-07-31 15:41:01 +0200
commit7e92b7332ea4d28648e69eabcb93cead35dbca26 (patch)
treeb7714536b89557129ed51fe675725fe28639c1e0 /tests/codeigniter/helpers/html_helper_test.php
parent57486009573a86d9e286a49c92216ba17aae0d5a (diff)
parent3a2d573a96241c01124d15c1ce517078e07c6235 (diff)
Merge branch 'develop' of github.com:/EllisLab/CodeIgniter into session
Diffstat (limited to 'tests/codeigniter/helpers/html_helper_test.php')
-rw-r--r--tests/codeigniter/helpers/html_helper_test.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/codeigniter/helpers/html_helper_test.php b/tests/codeigniter/helpers/html_helper_test.php
index 9a7bb48bf..4dd717ff7 100644
--- a/tests/codeigniter/helpers/html_helper_test.php
+++ b/tests/codeigniter/helpers/html_helper_test.php
@@ -22,6 +22,22 @@ class Html_helper_test extends CI_TestCase {
$this->assertEquals('<h2 class="bar">foobar</h2>', heading('foobar', 2, 'class="bar"'));
}
+ public function test_heading_array_attributes()
+ {
+ // Test array of attributes
+ $this->assertEquals('<h2 class="bar" id="foo">foobar</h2>', heading('foobar', 2, array('class' => 'bar', 'id' => 'foo')));
+ }
+
+ public function test_heading_object_attributes()
+ {
+ // Test array of attributes
+ $this->assertEquals('<h2 class="bar" id="foo">foobar</h2>', heading('foobar', 2, array('class' => 'bar', 'id' => 'foo')));
+ $test = new stdClass;
+ $test->class = "bar";
+ $test->id = "foo";
+ $this->assertEquals('<h2 class="bar" id="foo">foobar</h2>', heading('foobar', 2, $test));
+ }
+
// ------------------------------------------------------------------------
public function test_Ul()
@@ -72,5 +88,4 @@ EOH;
$this->assertEquals($expect, meta(array('name' => 'foo')));
}
-
} \ No newline at end of file