/** * Test the compilation of opening a secure form * * @group laravel */ public function testOpeningFormSecure() { $form1 = Form::open_secure('foobar', 'GET'); $form2 = Form::open_secure('foobar', 'POST'); $form3 = Form::open_secure('foobar', 'PUT', array('accept-charset' => 'UTF-16', 'class' => 'form')); $form4 = Form::open_secure('foobar', 'DELETE', array('class' => 'form')); $this->assertEquals('<form method="GET" action="https://localhost/index.php/foobar" accept-charset="UTF-8">', $form1); $this->assertEquals('<form method="POST" action="https://localhost/index.php/foobar" accept-charset="UTF-8">', $form2); $this->assertEquals('<form accept-charset="UTF-16" class="form" method="POST" action="https://localhost/index.php/foobar"><input type="hidden" name="_method" value="PUT">', $form3); $this->assertEquals('<form class="form" method="POST" action="https://localhost/index.php/foobar" accept-charset="UTF-8"><input type="hidden" name="_method" value="DELETE">', $form4); }