소스 검색

[tests] fix for base ODM test case to test connection

Gediminas Morkevicius 14 년 전
부모
커밋
e24919e274
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      tests/Gedmo/Tool/BaseTestCaseMongoODM.php

+ 2 - 1
tests/Gedmo/Tool/BaseTestCaseMongoODM.php

@@ -70,6 +70,7 @@ abstract class BaseTestCaseMongoODM extends \PHPUnit_Framework_TestCase
 
         try {
             $this->dm = DocumentManager::create($conn, $config, $evm ?: $this->getEventManager());
+            $this->dm->getConnection()->connect();
         } catch (\MongoException $e) {
             $this->markTestSkipped('Doctrine MongoDB ODM failed to connect');
         }
@@ -161,4 +162,4 @@ abstract class BaseTestCaseMongoODM extends \PHPUnit_Framework_TestCase
 
         return $config;
     }
-}
+}