Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tests/manager/manager-ctor-server.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
MongoDB\Driver\Manager::__construct(): check if server is live
--FILE--
<?php
require_once __DIR__ . "/../utils/basic.inc";

$manager = new \MongoDB\Driver\Manager(URI);

$command = new MongoDB\Driver\Command(['ping' => 1]);

try {
$manager->executeCommand("test", $command);
} catch (\MongoDB\Driver\Exception\ConnectionException $e) {
echo "Could not connect to MongoDB server: ", $e->getMessage(), "\n";
}
?>
===DONE===
--EXPECT--
===DONE===