Andreas Braun 10 лет назад
Родитель
Сommit
5bc48d9c73

+ 2 - 2
tests/Alcaeus/MongoDbAdapter/MongoCollectionTest.php

@@ -494,7 +494,7 @@ class MongoCollectionTest extends TestCase
         $this->assertTrue($collection->getSlaveOkay());
 
         $this->assertTrue($collection->setSlaveOkay(true));
-        $this->assertSame(['type' => \MongoClient::RP_SECONDARY_PREFERRED, 'tagsets' => ['a' => 'b']], $collection->getReadPreference());
+        $this->assertSame(['type' => \MongoClient::RP_SECONDARY_PREFERRED, 'tagsets' => [['a' => 'b']]], $collection->getReadPreference());
 
         $this->assertTrue($collection->setSlaveOkay(false));
         $this->assertSame(['type' => \MongoClient::RP_PRIMARY], $collection->getReadPreference());
@@ -512,7 +512,7 @@ class MongoCollectionTest extends TestCase
         $readPreference = $collection->getCollection()->__debugInfo()['readPreference'];
 
         $this->assertSame(ReadPreference::RP_SECONDARY, $readPreference->getMode());
-        $this->assertSame(['a' => 'b'], $readPreference->getTagSets());
+        $this->assertSame([['a' => 'b']], $readPreference->getTagSets());
     }
 
     public function testReadPreferenceIsInherited()

+ 1 - 1
tests/Alcaeus/MongoDbAdapter/MongoCommandCursorTest.php

@@ -42,7 +42,7 @@ class MongoCommandCursorTest extends TestCase
             'id' => '0',
             'at' => null,
             'numReturned' => null,
-            'server' => null,
+            'server' => 'localhost:27017;-;.;' . getmypid(),
             'host' => 'localhost',
             'port' => 27017,
             'connection_type_desc' => 'STANDALONE'

+ 1 - 1
tests/Alcaeus/MongoDbAdapter/MongoCursorTest.php

@@ -310,7 +310,7 @@ class MongoCursorTest extends TestCase
             'id' => '0',
             'at' => null,
             'numReturned' => null,
-            'server' => null,
+            'server' => 'localhost:27017;-;.;' . getmypid(),
             'host' => 'localhost',
             'port' => 27017,
             'connection_type_desc' => 'STANDALONE'

+ 1 - 1
tests/Alcaeus/MongoDbAdapter/MongoDBTest.php

@@ -144,7 +144,7 @@ class MongoDBTest extends TestCase
         $readPreference = $database->getDb()->__debugInfo()['readPreference'];
 
         $this->assertSame(ReadPreference::RP_SECONDARY, $readPreference->getMode());
-        $this->assertSame(['a' => 'b'], $readPreference->getTagSets());
+        $this->assertSame([['a' => 'b']], $readPreference->getTagSets());
 
     }