Skip to content

Commit 2354b3f

Browse files
committed
Remove isEnterprise helper
1 parent 80435ed commit 2354b3f

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

tests/DocumentationExamplesTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,9 +1827,7 @@ public function testQueryableEncryption(): void
18271827
$this->markTestSkipped('Explicit encryption tests require MongoDB 7.0 or later');
18281828
}
18291829

1830-
if (! $this->isEnterprise()) {
1831-
$this->markTestSkipped('Automatic encryption requires MongoDB Enterprise');
1832-
}
1830+
$this->skipIfClientSideEncryptionIsNotSupported();
18331831

18341832
// Fetch names for the database and collection under test
18351833
$collectionName = $this->getCollectionName();

tests/FunctionalTestCase.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -397,20 +397,6 @@ protected function isApiVersionRequired(): bool
397397
return isset($document->requireApiVersion) && $document->requireApiVersion === true;
398398
}
399399

400-
protected function isEnterprise(): bool
401-
{
402-
$buildInfo = $this->getPrimaryServer()->executeCommand(
403-
$this->getDatabaseName(),
404-
new Command(['buildInfo' => 1])
405-
)->toArray()[0];
406-
407-
if (isset($buildInfo->modules) && is_array($buildInfo->modules)) {
408-
return in_array('enterprise', $buildInfo->modules);
409-
}
410-
411-
throw new UnexpectedValueException('Could not determine server modules');
412-
}
413-
414400
protected function isLoadBalanced()
415401
{
416402
return $this->getPrimaryServer()->getType() == Server::TYPE_LOAD_BALANCER;

tests/SpecTests/ClientSideEncryption/Prose21_AutomaticDataEncryptionKeysTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ public function setUp(): void
3131
{
3232
parent::setUp();
3333

34-
if (! $this->isEnterprise()) {
35-
$this->markTestSkipped('Automatic data encryption key tests require MongoDB enterprise');
36-
}
34+
$this->skipIfClientSideEncryptionIsNotSupported();
3735

3836
if ($this->isStandalone() || ($this->isShardedCluster() && ! $this->isShardedClusterUsingReplicasets())) {
3937
$this->markTestSkipped('Automatic data encryption key tests require replica sets');

0 commit comments

Comments
 (0)