xref: /PHP-5.4/ext/oci8/tests/extauth_04.phpt (revision 1c1c98c6)
1--TEST--
2Test External Authentication errors on Windows
3--SKIPIF--
4<?php
5if (!extension_loaded('oci8')) die ("skip no oci8 extension");
6if (substr(PHP_OS, 0, 3) != 'WIN') die("skip this test is for Windows platforms only");
7?>
8--FILE--
9<?php
10
11// Run Test
12
13echo "Test 1\n";
14
15$c = oci_connect('/', '', 'anything', null, OCI_CRED_EXT);
16if (!$c) {
17	$m = oci_error();
18	var_dump($m);
19}
20var_dump($c);
21
22echo "Test 2\n";
23
24$c = oci_new_connect('/', '', 'anything', null, OCI_CRED_EXT);
25if (!$c) {
26	$m = oci_error();
27	var_dump($m);
28}
29var_dump($c);
30
31echo "Test 3\n";
32
33$c = oci_pconnect('/', '', 'anything', null, OCI_CRED_EXT);
34if (!$c) {
35	$m = oci_error();
36	var_dump($m);
37}
38var_dump($c);
39
40?>
41===DONE===
42<?php exit(0); ?>
43--EXPECTF--
44Test 1
45Warning: oci_connect(): External Authentication is not supported on Windows in %s on line %d
46bool(false)
47bool(false)
48Test 2
49Warning: oci_new_connect(): External Authentication is not supported on Windows in %s on line %d
50bool(false)
51bool(false)
52Test 3
53Warning: oci_pconnect(): External Authentication is not supported on Windows in %s on line %d
54bool(false)
55bool(false)
56===DONE===
57