H1 title should be "Welcome to MailPoet version 3!", as per wireframes remove logo in top right of the page remove the classes feature-section one-col to the parent new styles for #logger progress bar: ensure that the color and size for the font are the same as our current progress bar. display the progress bar at 100% when the import of subscribers and lists is complete move loadSQL() function in tests/_support/Helper/Database.php remove CSS browser prefixes use AMD module definition to embed the JavaScript remove extra whitespace in JavaScript file remove the redundant functions descriptions rename objectPlugin to mailpoet_mp2_migrator replace private $chunks_size by the constant CHUNK_SIZE add the constant IMPORT_TIMEOUT_IN_SECONDS replace Helpers::mysqlDate() by $datetime->formatTime(time(), \MailPoet\WP\DateTime::DEFAULT_DATE_TIME_FORMAT) make the log messages translatable fix PHPDoc replace Env::$plugin_name by 'mailpoet' in the translation functions use $snake_case for variable names, use lowercaseCamelCase for method names, use CamelCase for class names define MP2 table names as constants add spaces around ternary operators use the models for MP3 entities, instead of counting via raw SQL queries use \ORM::for_table('some_table')::count()
23 lines
520 B
PHP
23 lines
520 B
PHP
<?php
|
||
namespace Helper;
|
||
use MailPoet\Config\Env;
|
||
|
||
// here you can define custom actions
|
||
// all public methods declared in helper class will be available in $I
|
||
|
||
class Database extends \Codeception\Module
|
||
{
|
||
/**
|
||
* Load a SQL file
|
||
*
|
||
* @param string $filename Filename without extension
|
||
*/
|
||
static public function loadSQL($filename) {
|
||
$db = \ORM::getDb();
|
||
$full_filename = Env::$path . '/tests/_data/' . $filename . '.sql';
|
||
$sql = file_get_contents($full_filename);
|
||
$db->exec($sql);
|
||
}
|
||
|
||
}
|