Skip to content

Commit ae0cfea

Browse files
committed
Allow for PHONGO-SERVERS.json in ~ (and fix a test case name)
1 parent 2aa5329 commit ae0cfea

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/server/server-debug.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
MongoDB\Driver\Server::executeQuery() with sort and empty filter
2+
MongoDB\Driver\Server debugInfo
33
--SKIPIF--
44
<?php require __DIR__ . "/../utils/basic-skipif.inc"; CLEANUP(STANDALONE) ?>
55
--FILE--

tests/utils/basic.inc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<?php
22
require __DIR__ . "/" . "tools.php";
33

4-
5-
$FILENAME = sys_get_temp_dir() . "/PHONGO-SERVERS.json";
4+
if (file_exists("{$_SERVER['HOME']}/PHONGO-SERVERS.json")) {
5+
$FILENAME = "{$_SERVER['HOME']}/PHONGO-SERVERS.json";
6+
} else {
7+
$FILENAME = sys_get_temp_dir() . "/PHONGO-SERVERS.json";
8+
}
69

710
$json = file_get_contents($FILENAME);
811
$config = json_decode($json, true);

0 commit comments

Comments
 (0)