mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 20:43:25 +00:00
Fix #1705 : MySQL connection might be lost after long operations
This commit is contained in:
@@ -107,6 +107,8 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
||||
|
||||
parent::setUp();
|
||||
|
||||
connection::close_connections();
|
||||
|
||||
\PHPUnit_Framework_Error_Warning::$enabled = true;
|
||||
\PHPUnit_Framework_Error_Notice::$enabled = true;
|
||||
|
||||
@@ -989,4 +991,9 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
}
|
||||
|
||||
public function createConnectionMock()
|
||||
{
|
||||
return $this->getMock('connection_interface', array('close', 'get_credentials', 'server_info', 'prepare', 'beginTransaction', 'commit', 'ping', 'get_name', 'is_multi_db'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user