Exemplo n.º 1
0
 public function testGetTag()
 {
     $form = new \r8\Form();
     $form->setMethod("get");
     $form->setEncoding('multipart/form-data');
     $form->setAction('/dir/file.php');
     $tag = $form->getTag();
     $this->assertThat($tag, $this->isInstanceOf("r8\\HTML\\Tag"));
     $this->assertSame("form", $tag->getTag());
     $this->assertTrue(isset($tag['method']));
     $this->assertSame("get", $tag['method']);
     $this->assertTrue(isset($tag['encoding']));
     $this->assertSame("multipart/form-data", $tag['encoding']);
     $this->assertTrue(isset($tag['action']));
     $this->assertSame("/dir/file.php", $tag['action']);
 }