Skip to content

Commit a527c60

Browse files
camportercmb69
authored andcommitted
PDO_OCI: Add test of the phpinfo output
1 parent 8ea3493 commit a527c60

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
PDO_OCI: phpinfo() output
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
6+
require(__DIR__.'/../../pdo/tests/pdo_test.inc');
7+
PDOTest::skip();
8+
?>
9+
--FILE--
10+
<?php
11+
require(__DIR__.'/../../pdo/tests/pdo_test.inc');
12+
$db = PDOTest::factory();
13+
14+
ob_start();
15+
phpinfo();
16+
$tmp = ob_get_contents();
17+
ob_end_clean();
18+
19+
$reg = 'PDO Driver for OCI 8 and later => enabled';
20+
if (!preg_match("/$reg/", $tmp)) {
21+
printf("[001] Cannot find OCI PDO driver line in phpinfo() output\n");
22+
}
23+
24+
print "done!";
25+
?>
26+
--EXPECT--
27+
done!

0 commit comments

Comments
 (0)