public function testCreateSectionsFromArray() { $this->form->createSectionsFromArray(['1' => ['label' => 'One'], '2' => ['label' => 'Two']]); $this->assertTrue($this->form->hasSection('1')); $this->assertTrue($this->form->hasSection('2')); $this->assertFalse($this->form->hasSection('3')); }
public function testFileFormEncoding() { $form_blueprint = new FormBlueprint(); $form_blueprint->add('file_upload', 'file'); $handler = new FormHandler($form_blueprint); $this->assertEquals('multipart/form-data', $handler->getEncoding()); }
public function testSuccessMessage() { $formBlueprint = new FormBlueprint(); $formBlueprint->setSuccessMessage('Form Submitted Message'); $this->formView->setFormBlueprint($formBlueprint); $this->formView->setSubmitted(true); $this->assertEquals('Form Submitted Message', $this->formView->getSuccessMessage('Form Submitted Message')); }