Inheritance: extends Element
Ejemplo n.º 1
0
 public function testEncodingType()
 {
     $form = new FormOpen();
     $expected = '<form method="POST" action="" enctype="custom">';
     $result = $form->encodingType('custom')->render();
     $this->assertEquals($expected, $result);
 }
Ejemplo n.º 2
0
 public function open()
 {
     $open = new FormOpen();
     if ($this->hasToken()) {
         $open->token($this->csrfToken);
     }
     return $open;
 }
Ejemplo n.º 3
0
 public function testRenderCustomMethodWithToken()
 {
     $open = new FormOpen();
     $expected = '<form method="POST" action=""><input type="hidden" name="_token" value="abc123"><input type="hidden" name="_method" value="DELETE">';
     $result = $open->token('abc123')->delete()->render();
     $this->assertEquals($expected, $result);
 }