Esempio n. 1
0
 /**
  * Tests resetInput with displayTo
  *
  * @author Nikolaos Dimopoulos <*****@*****.**>
  * @since  2014-09-05
  */
 public function testResetInputWithDisplayTo()
 {
     $this->specify("resetInput with displayTo returns invalid HTML Strict", function () {
         Tag::setDoctype(Tag::XHTML10_STRICT);
         $options = 'x_name';
         $expected = '<input type="text" id="x_name" name="x_name" ' . 'value="x_other" />';
         Tag::displayTo('x_name', 'x_other');
         $actual = Tag::textField($options);
         Tag::resetInput();
         expect($actual)->equals($expected);
         $expected = '<input type="text" id="x_name" name="x_name" />';
         $actual = Tag::textField($options);
         expect($actual)->equals($expected);
     });
     $this->specify("resetInput with displayTo returns invalid HTML XHTML", function () {
         Tag::setDoctype(Tag::HTML5);
         $options = 'x_name';
         $expected = '<input type="text" id="x_name" name="x_name" ' . 'value="x_other">';
         Tag::displayTo('x_name', 'x_other');
         $actual = Tag::textField($options);
         Tag::resetInput();
         expect($actual)->equals($expected);
         $expected = '<input type="text" id="x_name" name="x_name">';
         $actual = Tag::textField($options);
         expect($actual)->equals($expected);
     });
 }