소스 검색

Fix failing test due to error message

Andreas Braun 10 년 전
부모
커밋
81d7fa4ac2
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      tests/Alcaeus/MongoDbAdapter/MongoInsertBatchTest.php

+ 1 - 2
tests/Alcaeus/MongoDbAdapter/MongoInsertBatchTest.php

@@ -40,7 +40,6 @@ class MongoInsertBatchTest extends TestCase
                 [
                     'index' => 1,
                     'code' => 11000,
-                    'errmsg' => 'E11000 duplicate key error collection: mongo-php-adapter.test index: foo_1 dup key: { : "bar" }',
                 ]
             ],
             'nInserted' => 1,
@@ -51,7 +50,7 @@ class MongoInsertBatchTest extends TestCase
             $batch->execute();
         } catch (\MongoWriteConcernException $e) {
             $this->assertSame('Failed write', $e->getMessage());
-            $this->assertSame($expected, $e->getDocument());
+            $this->assertArraySubset($expected, $e->getDocument());
         }
     }
 }