protected function setUp() { parent::setUp(); \Myfox\Lib\Mysql::register('default', __DIR__ . '/ini/mysql.ini'); self::$mysql = \Myfox\Lib\Mysql::instance('default'); self::$mysql->query(sprintf('TRUNCATE TABLE %stask_queque', self::$mysql->option('prefix', ''))); }
protected function setUp() { parent::setUp(); \Myfox\Lib\Mysql::removeAllNames(); \Myfox\Lib\Mysql::register('default', __DIR__ . '/ini/mysql.ini'); self::$mysql = \Myfox\Lib\Mysql::instance('default'); }
protected function tearDown() { clearstatcache(); @unlink($this->file); $this->file = null; parent::tearDown(); }
protected function setUp() { parent::setUp(); \Myfox\Lib\Mysql::register('default', __DIR__ . '/ini/mysql.ini'); self::$mysql = \Myfox\Lib\Mysql::instance('default'); self::$inifile = __DIR__ . '/ini/myfox.ini'; self::cleanTable('default', 'process_locker'); }
protected function tearDown() { if (!empty($this->pool)) { $this->pool->cleanAllCache(); unset($this->pool); } parent::tearDown(); }
protected function setUp() { parent::setUp(); \Myfox\Lib\Mysql::register('default', __DIR__ . '/ini/mysql.ini'); self::$mysql = \Myfox\Lib\Mysql::instance('default'); self::cleanTable('default', 'route_info'); self::cleanTable('default', 'task_queque'); }
protected function setUp() { parent::setUp(); \Myfox\Lib\Mysql::removeAllNames(); \Myfox\Lib\Mysql::register('default', __DIR__ . '/ini/mysql.ini'); self::$mysql = \Myfox\Lib\Mysql::instance('default'); self::$mysql->query(sprintf("DELETE FROM %shost_list WHERE host_name LIKE 'unittest%%'", self::$mysql->option('prefix', ''))); }
/** * 测试表及信息创建 */ protected function setUp() { parent::setUp(); \Myfox\Lib\Mysql::removeAllNames(); \Myfox\Lib\Mysql::register('default', __DIR__ . '/ini/mysql.ini'); $this->mysql = \Myfox\Lib\Mysql::instance('default'); $config = new \Myfox\Lib\Config(__DIR__ . '/ini/mysql.ini'); foreach ($config->get('master') as $host) { $urlRes = parse_url($host); $this->infos['host'] = $urlRes['host']; $this->infos['port'] = array_key_exists('port', $urlRes) ? $urlRes['port'] : 3306; $this->infos['user'] = array_key_exists('user', $urlRes) ? $urlRes['user'] : '******'; $this->infos['pass'] = array_key_exists('pass', $urlRes) ? $urlRes['pass'] : ''; } self::cleanTable('default', 'route_info'); $this->table_bak('table_list'); $this->table_bak('host_list'); $this->table_bak('settings'); //插入测试分片表1 $this->mysql->query('CREATE TABLE `test_table_real1` ( `id` int(10) unsigned NOT NULL auto_increment, `key1` varchar(64) NOT NULL default "", `key2` int(10) NOT NULL default 0, PRIMARY KEY (`id`) )'); //插入测试分片表2 $this->mysql->query('CREATE TABLE `test_table_real2` ( `id` int(10) unsigned NOT NULL auto_increment, `key1` varchar(64) NOT NULL default "", `key2` int(10) NOT NULL default 0, PRIMARY KEY (`id`) )'); //插入测试分片表3 $this->mysql->query('CREATE TABLE `test_table_real3` ( `id` int(10) unsigned NOT NULL auto_increment, `key1` varchar(64) NOT NULL default "", `key2` int(10) NOT NULL default 0, PRIMARY KEY (`id`) )'); }
protected function tearDown() { Apc::cleanAllCache(); parent::tearDown(); }
protected function tearDown() { parent::tearDown(); }
protected function setUp() { parent::setUp(); $this->inifile = __DIR__ . '/ini/myfox.ini'; }
protected function tearDown() { @unlink($this->logfile); parent::tearDown(); }
protected function tearDown() { Context::cleanAllContext(); parent::tearDown(); }
protected function tearDown() { //@exec(sprintf('rm -rf "%s"', __DIR__ . '/tmp')); parent::tearDown(); }
protected function tearDown() { Config::removeAllNames(); parent::tearDown(); }
protected function tearDown() { Table::cleanAllStatic(); parent::tearDown(); }
protected function tearDown() { @ob_end_clean(); @unlink($this->logfile); parent::tearDown(); }
protected function tearDown() { Factory::removeAllObject(true); parent::tearDown(); }