extauth_04.phpt 1.1 KB

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