Files
piratepoet/tests/_bootstrap.php
Jonathan Labreuille 2a4945c956 Listing & Form & Refactoring
- 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
2015-09-16 12:14:04 +02:00

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);