Просмотр исходного кода

Fix failing test due to error message

Andreas Braun 10 лет назад
Родитель
Сommit
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());
         }
     }
 }