mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
24 lines
615 B
PHP
24 lines
615 B
PHP
<?php
|
|
namespace Codeception\Module;
|
|
|
|
class DbDropTablesHelper extends \Codeception\Module\Db
|
|
{
|
|
protected $requiredFields = [];
|
|
|
|
public function cleanup()
|
|
{
|
|
$dbh = $this->driver->getDbh();
|
|
if (!$dbh) {
|
|
throw new ModuleConfigException(
|
|
__CLASS__,
|
|
"No connection to database. Remove this module from config if you don't need database repopulation"
|
|
);
|
|
}
|
|
|
|
try {
|
|
$this->driver->cleanup();
|
|
} catch (\Exception $e) {
|
|
throw new ModuleException(__CLASS__, $e->getMessage());
|
|
}
|
|
}
|
|
}
|