Esempio n. 1
0
 /**
  * Tests tagHtml with array parameter
  *
  * @author Nikolaos Dimopoulos <*****@*****.**>
  * @since  2014-09-05
  */
 public function testTagHtmlWithArray()
 {
     $this->specify("tagHtml with array parameter returns invalid HTML Strict", function () {
         Tag::resetInput();
         $name = 'canvas';
         $options = ['id' => 'canvas1', 'width' => 300, 'height' => 300];
         $expected = '<canvas id="canvas1" width="300" height="300">';
         Tag::setDocType(Tag::XHTML10_STRICT);
         $actual = Tag::tagHtml($name, $options);
         expect($actual)->equals($expected);
     });
     $this->specify("tagHtml with array parameter returns invalid HTML XHTML", function () {
         Tag::resetInput();
         $name = 'canvas';
         $options = ['id' => 'canvas1', 'width' => 300, 'height' => 300];
         $expected = '<canvas id="canvas1" width="300" height="300">' . '</canvas>';
         Tag::setDocType(Tag::HTML5);
         $actual = Tag::tagHtml($name, $options);
         expect($actual)->equals($expected);
     });
 }