We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a715525 commit 8053498Copy full SHA for 8053498
src/Tests/PersistUnit/ModelTest.php
@@ -51,6 +51,15 @@ protected static function getCaches(){
51
}
52
53
public static function setUpBeforeClass(){
54
+ // close connections if any
55
+ $reflectionProperty = new \ReflectionProperty('PhpPlatform\Persist\Connection\ConnectionFactory', 'connection');
56
+ $reflectionProperty->setAccessible(true);
57
+ $conection = $reflectionProperty->getValue(null);
58
+ if($conection != null){
59
+ $conection->close();
60
+ $reflectionProperty->setValue(null,null);
61
+ }
62
+
63
self::$_databaseName = "db".preg_replace('/[^0-9]/', '', microtime());
64
65
// get connection parameters
0 commit comments