- finished implementing forms - fixed form reset when clicking on new - fixed responsive for select all checkbox and toggle item details - refactored listing items' actions - added Trash action - cleaned up validations on models - fixed syntax - fixed tests
21 lines
455 B
PHP
21 lines
455 B
PHP
<?php
|
|
|
|
$console = new \Codeception\Lib\Console\Output([]);
|
|
|
|
$console->writeln('Loading WP core...');
|
|
require_once(getenv('WP_TEST_PATH') . '/wp-load.php');
|
|
|
|
$console->writeln('Cleaning up database...');
|
|
$models = array(
|
|
'Subscriber',
|
|
'Setting',
|
|
'Newsletter',
|
|
'Segment',
|
|
'SubscriberSegment'
|
|
);
|
|
$destroy = function ($model) {
|
|
Model::factory('\MailPoet\Models\\' . $model)
|
|
->deleteMany();
|
|
};
|
|
array_map($destroy, $models);
|