Create a default form

[MAILPOET-1449]
This commit is contained in:
Pavel Dohnal
2018-11-13 15:38:46 +01:00
parent a393ad5b61
commit ad85c7e4b1
3 changed files with 97 additions and 8 deletions

View File

@@ -447,7 +447,7 @@ class MP2MigratorTest extends \MailPoetTest {
$this->initImport();
$this->loadMP2Fixtures();
$this->invokeMethod($this->MP2Migrator, 'importForms');
expect(Form::count())->equals(2);
expect(Form::count())->equals(3);
// Check a form data
$this->initImport();
@@ -495,7 +495,7 @@ class MP2MigratorTest extends \MailPoetTest {
));
$this->invokeMethod($this->MP2Migrator, 'importForms');
$table = MP_FORMS_TABLE;
$form = $wpdb->get_row("SELECT * FROM $table WHERE id=" . 1);
$form = $wpdb->get_row("SELECT * FROM $table WHERE id=" . 2);
expect($form->name)->equals($name);
$settings = unserialize(($form->settings));
expect($settings['on_success'])->equals('message');