You are here

DefaultComponentsTest.php in Form Builder 7.2

File

modules/webform/tests/DefaultComponentsTest.php
View source
<?php

namespace Drupal\form_builder_webform;

use Drupal\form_builder\Loader;

/**
 * Test the default component configuration of form builder element types.
 */
class DefaultComponentsTest extends \DrupalUnitTestCase {

  /**
   * Test that the default markup has a text-format.
   */
  public function testMarkupTextFormat() {
    $types = Loader::instance()
      ->getElementTypeInfo('webform', NULL);
    $component = $types['markup']['default']['#webform_component'];
    $element = webform_component_invoke($component['type'], 'render', $component);
    $this
      ->assertNotEmpty($element['#format']);
  }

}

Classes

Namesort descending Description
DefaultComponentsTest Test the default component configuration of form builder element types.