beforeApplicationDestroyed(function () { foreach (array_keys($this->app['db']->getConnections()) as $name) { $this->app['db']->purge($name); } }); parent::setUp(); } protected function getEnvironmentSetUp($app) { $connection = $app['config']->get('database.default'); $this->driver = $app['config']->get("database.connections.$connection.driver"); } }