public function YamlFormSubmissionFormTest::testForm in YAML Form 8
Tests prepare elements.
File
- src/
Tests/ YamlFormSubmissionFormTest.php, line 24
Class
- YamlFormSubmissionFormTest
- Tests for form submission form.
Namespace
Drupal\yamlform\TestsCode
public function testForm() {
/* Test form#validate form handling */
$yamlform_validate = YamlForm::load('test_form_validate');
$this
->postSubmission($yamlform_validate, [], t('Submit'));
$this
->assertRaw('Custom element is required.');
$this
->postSubmission($yamlform_validate, [
'custom' => 'value',
], t('Submit'));
$this
->assertNoRaw('Custom element is required.');
}