Fix #1705 : MySQL connection might be lost after long operations

This commit is contained in:
Romain Neutron
2014-02-28 12:35:11 +01:00
parent 170c145e15
commit 035576cefc
22 changed files with 128 additions and 68 deletions

View File

@@ -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'));
}
}