public function __construct($options) { $this->options = $options; $this->table = $options['table']; $this->db = Db::connection($options['connection']); $this->db->tableExists($this->table) or $this->createTable(); Config::runningUnitTest() and $this->db->delete($this->table); }