We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b1a7ef commit 8364cd4Copy full SHA for 8364cd4
tests/utils/tools.php
@@ -60,6 +60,22 @@ function makeCollectionNameFromFilename($filename)
60
return preg_replace(array_keys($replacements), array_values($replacements), $filename);
61
}
62
63
+function TESTCOMMANDS($uri) {
64
+ $cmd = array(
65
+ "configureFailPoint" => 1,
66
+ );
67
+ $command = new MongoDB\Driver\Command($cmd);
68
+
69
+ $manager = new MongoDB\Driver\Manager($uri);
70
+ try {
71
+ $result = $manager->executeCommand("test", $command);
72
+ } catch(Exception $e) {
73
+ /* command not found */
74
+ if ($e->getCode() == 59) {
75
+ die("skip this test requires mongod with enableTestCommands");
76
+ }
77
78
+}
79
function NEEDS($uri) {
80
if (!constant($uri)) {
81
exit("skip -- need '$uri' defined");
0 commit comments