public function preTest() { parent::preTest(); // create the table $cmd = "CREATE TABLE {$this->_config['table']} (\n {$this->_config['handle_col']} VARCHAR(255),\n {$this->_config['role_col']} CHAR(32)\n )"; $this->_sql->query($cmd); // get the roles $dir = Solar_Class::dir('Mock_Solar_Role_Adapter_Sql'); $file = $dir . 'roles.ini'; $roles = parse_ini_file($file, true); // insert the roles foreach ($roles as $role => $val) { $handles = explode(',', $val['handles']); foreach ($handles as $handle) { $data[$this->_config['handle_col']] = trim($handle); $data[$this->_config['role_col']] = trim($role); $this->_sql->insert('roles', $data); } } }
/** * * Setup; runs after each test method. * */ public function teardown() { parent::teardown(); }