Fix test for Migrator.
This commit is contained in:
@@ -225,7 +225,7 @@ class Initializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function admin_page() {
|
public function admin_page() {
|
||||||
$subscriber = new Models\Subscriber();
|
/* $subscriber = new Models\Subscriber(); */
|
||||||
|
|
||||||
$option = new WP\Option();
|
$option = new WP\Option();
|
||||||
$option->set('option_name', 'option value');
|
$option->set('option_name', 'option value');
|
||||||
@@ -239,7 +239,7 @@ class Initializer {
|
|||||||
array('name' => 'Joo', 'email' => 'jonathan@mailpoet.com'),
|
array('name' => 'Joo', 'email' => 'jonathan@mailpoet.com'),
|
||||||
array('name' => 'Marco', 'email' => 'marco@mailpoet.com'),
|
array('name' => 'Marco', 'email' => 'marco@mailpoet.com'),
|
||||||
),
|
),
|
||||||
'subscriber' => $subscriber->name,
|
/* 'subscriber' => $subscriber->name, */
|
||||||
'option' => $option->get('option_name')
|
'option' => $option->get('option_name')
|
||||||
);
|
);
|
||||||
// Sample page using Twig
|
// Sample page using Twig
|
||||||
|
@@ -43,7 +43,7 @@ class Migrator {
|
|||||||
'first_name tinytext NOT NULL,',
|
'first_name tinytext NOT NULL,',
|
||||||
'last_name tinytext NOT NULL,',
|
'last_name tinytext NOT NULL,',
|
||||||
'email tinytext NOT NULL,',
|
'email tinytext NOT NULL,',
|
||||||
'PRIMARY KEY (id)'
|
'PRIMARY KEY (id)',
|
||||||
);
|
);
|
||||||
return $this->sqlify(__FUNCTION__, $attributes);
|
return $this->sqlify(__FUNCTION__, $attributes);
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@ class MigratorCest {
|
|||||||
$this->migrator = new Migrator();
|
$this->migrator = new Migrator();
|
||||||
}
|
}
|
||||||
|
|
||||||
function itCanGenerateTheSubscriberSql() {
|
function itCanGenerateTheSubscribersSql() {
|
||||||
$subscriber_sql = $this->migrator->subscribers();
|
$subscriber_sql = $this->migrator->subscribers();
|
||||||
$expected_table = $this->migrator->prefix . 'subscribers';
|
$expected_table = $this->migrator->prefix . 'subscribers';
|
||||||
expect($subscriber_sql)->contains($expected_table);
|
expect($subscriber_sql)->contains($expected_table);
|
||||||
|
Reference in New Issue
Block a user