summaryrefslogtreecommitdiff
path: root/ext/oci8/tests/extauth_04.phpt
blob: edb2fbd9123c99c9174a3c9a297862f0c8c808e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--TEST--
Test External Authentication errors on Windows
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
if (substr(PHP_OS, 0, 3) != 'WIN') die("skip this test is for Windows platforms only");
?>
--FILE--
<?php

// Run Test

echo "Test 1\n";

$c = oci_connect('/', '', 'anything', null, OCI_CRED_EXT);
if (!$c) {
	$m = oci_error();
	var_dump($m);
}
var_dump($c);

echo "Test 2\n";

$c = oci_new_connect('/', '', 'anything', null, OCI_CRED_EXT);
if (!$c) {
	$m = oci_error();
	var_dump($m);
}
var_dump($c);

echo "Test 3\n";

$c = oci_pconnect('/', '', 'anything', null, OCI_CRED_EXT);
if (!$c) {
	$m = oci_error();
	var_dump($m);
}
var_dump($c);

?>
--EXPECTF--
Test 1

Warning: oci_connect(): External Authentication is not supported on Windows in %s on line %d
bool(false)
bool(false)
Test 2

Warning: oci_new_connect(): External Authentication is not supported on Windows in %s on line %d
bool(false)
bool(false)
Test 3

Warning: oci_pconnect(): External Authentication is not supported on Windows in %s on line %d
bool(false)
bool(false)