You are here

public function FormBaseTest::testSaveAndLoad in Form Builder 7.2

@cover \Drupal\form_builder\Loader::fromCache @cover \Drupal\form_builder\FormBase::load @cover \Drupal\form_builder\FormBase::save

File

tests/FormBaseTest.php, line 30

Class

FormBaseTest

Namespace

Drupal\form_builder

Code

public function testSaveAndLoad() {
  $loader = Loader::instance();
  $form = $loader
    ->getForm('webform', 'test', 'test', array());
  $form
    ->save();
  $this
    ->assertEqual($form
    ->getFormArray(), $loader
    ->fromCache('webform', 'test', 'test')
    ->getFormArray());
}