YamlFormSubmissionFormTest.php in YAML Form 8
File
src/Tests/YamlFormSubmissionFormTest.php
View source
<?php
namespace Drupal\yamlform\Tests;
use Drupal\yamlform\Entity\YamlForm;
class YamlFormSubmissionFormTest extends YamlFormTestBase {
protected static $modules = [
'system',
'user',
'yamlform',
'yamlform_test',
];
public function testForm() {
$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.');
}
}