YamlFormElementAttributesTest.php in YAML Form 8
File
src/Tests/YamlFormElementAttributesTest.php
View source
<?php
namespace Drupal\yamlform\Tests;
use Drupal\simpletest\WebTestBase;
class YamlFormElementAttributesTest extends WebTestBase {
protected static $modules = [
'system',
'user',
'yamlform',
'yamlform_test',
];
public function test() {
$this
->drupalPostForm('yamlform/test_element_attributes', [], t('Submit'));
$this
->assertRaw("yamlform_element_attributes:\n class:\n - one\n - two\n - four\n style: 'color: red'\n custom: test");
}
}