Exemplo n.º 1
0
 public function test_should_mysql_reconnect_when_gone_away_works_fine()
 {
     $mysql = new Mysql(__DIR__ . '/ini/mysql.ini');
     $result = $mysql->getAll($mysql->query('SHOW DATABASES'));
     $this->assertEquals(0, $mysql->query(sprintf('KILL %d', $mysql->thread_id)));
     $this->assertEquals($result, $mysql->getAll($mysql->query('SHOW DATABASES')));
 }