Skip to content

Commit 3939b4a

Browse files
committed
Fix logic for isReplicaSet
This function was introduced in 7a54cbe and only used in one test.
1 parent 373cbe2 commit 3939b4a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/Database/DatabaseFunctionalTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function testCommand()
102102

103103
public function testCommandDoesNotInheritReadPreference()
104104
{
105-
if ($this->isReplicaSet()) {
105+
if (! $this->isReplicaSet()) {
106106
$this->markTestSkipped('Test only applies to replica sets');
107107
}
108108

tests/FunctionalTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ protected function getServerStorageEngine(ReadPreference $readPreference = null)
303303

304304
protected function isReplicaSet()
305305
{
306-
return $this->getPrimaryServer()->getType() !== Server::TYPE_RS_PRIMARY;
306+
return $this->getPrimaryServer()->getType() == Server::TYPE_RS_PRIMARY;
307307
}
308308

309309
protected function isShardedCluster()

0 commit comments

Comments
 (0)