Skip to content

Commit 6ed6a34

Browse files
committed
Only assert mongodb.debug INI in phpinfo() tests
The current phpinfo() tests were fragile and not compatible when build against libbson/libmongoc system libraries, which might also have different SSL options.
1 parent 04bd60b commit 6ed6a34

File tree

2 files changed

+2
-38
lines changed

2 files changed

+2
-38
lines changed

tests/functional/phpinfo-1.phpt

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
--TEST--
2-
phpinfo()
2+
phpinfo() reports mongodb.debug (no value)
33
--SKIPIF--
44
<?php if (defined("HHVM_VERSION_ID")) exit("skip HHVM does not do phpinfo() this way"); ?>
5-
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
65
--FILE--
76
<?php
8-
require_once __DIR__ . "/../utils/basic.inc";
97

108
phpinfo();
119

@@ -14,22 +12,6 @@ phpinfo();
1412
<?php exit(0); ?>
1513
--EXPECTF--
1614
%a
17-
mongodb
18-
19-
MongoDB support => enabled
20-
MongoDB extension version => 1.%d.%d%S
21-
MongoDB extension stability => %s
22-
libbson bundled version => 1.%d.%d%S
23-
libmongoc bundled version => 1.%d.%d%S
24-
libmongoc SSL => enabled
25-
libmongoc SSL library => %s
26-
libmongoc crypto => enabled
27-
libmongoc crypto library => %s
28-
libmongoc crypto system profile => %s
29-
libmongoc SASL => enabled
30-
31-
Directive => Local Value => Master Value
3215
mongodb.debug => no value => no value
33-
3416
%a
3517
===DONE===

tests/functional/phpinfo-2.phpt

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
--TEST--
2-
phpinfo()
2+
phpinfo() reports mongodb.debug (default and overridden)
33
--INI--
44
mongodb.debug=stderr
55
--SKIPIF--
66
<?php if (defined("HHVM_VERSION_ID")) exit("skip HHVM does not do phpinfo() this way"); ?>
7-
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
87
--FILE--
98
<?php
10-
require_once __DIR__ . "/../utils/basic.inc";
119

1210
ini_set("mongodb.debug", "stdout");
1311
phpinfo();
@@ -17,22 +15,6 @@ phpinfo();
1715
<?php exit(0); ?>
1816
--EXPECTF--
1917
%a
20-
mongodb
21-
22-
MongoDB support => enabled
23-
MongoDB extension version => 1.%d.%d%S
24-
MongoDB extension stability => %s
25-
libbson bundled version => 1.%d.%d%S
26-
libmongoc bundled version => 1.%d.%d%S
27-
libmongoc SSL => enabled
28-
libmongoc SSL library => %s
29-
libmongoc crypto => enabled
30-
libmongoc crypto library => %s
31-
libmongoc crypto system profile => %s
32-
libmongoc SASL => enabled
33-
34-
Directive => Local Value => Master Value
3518
mongodb.debug => stdout => stderr
36-
3719
%a
3820
===DONE===

0 commit comments

Comments
 (0)