diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-02-01 21:25:15 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-02-01 21:25:15 +0100 |
commit | 96fb2ff5760132a915766f1d9ec7c63001feacd8 (patch) | |
tree | 160904a89a8f3522fa4e47632db101b045e7814a /ext/oci8/tests | |
parent | 8f1428d29ef91d74b4d272af171675f2971eb15b (diff) | |
download | php-96fb2ff5760132a915766f1d9ec7c63001feacd8.tar.gz |
Imported Upstream version 5.4.0~rc6upstream/5.4.0_rc6
Diffstat (limited to 'ext/oci8/tests')
-rw-r--r-- | ext/oci8/tests/null_byte_1.phpt | 20 | ||||
-rw-r--r-- | ext/oci8/tests/oci8safemode.phpt | 23 |
2 files changed, 14 insertions, 29 deletions
diff --git a/ext/oci8/tests/null_byte_1.phpt b/ext/oci8/tests/null_byte_1.phpt index 1439bd5d6..0869d9412 100644 --- a/ext/oci8/tests/null_byte_1.phpt +++ b/ext/oci8/tests/null_byte_1.phpt @@ -1,13 +1,21 @@ --TEST-- -Protect against null bytes in LOB filenames (http://news.php.net/php.internals/50202) +Protect against null bytes in LOB filenames --SKIPIF-- -<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?> +<?php +if (!extension_loaded('oci8')) + die ("skip no oci8 extension"); +if (PHP_MAJOR_VERSION < 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4)) + die ("skip Test only valid for PHP 5.4 onwards"); +?> --INI-- display_errors = On error_reporting = E_WARNING --FILE-- <?php +// See http://news.php.net/php.internals/50202 +// http://svn.php.net/viewvc?view=revision&revision=311870 + require(dirname(__FILE__).'/connect.inc'); // Run Test @@ -29,10 +37,10 @@ var_dump($r); --EXPECTF-- Test 1: Import -Warning: OCI-Lob::savefile(): Filename cannot contain null bytes in %snull_byte_1.php on line %d -bool(false) +Warning: OCI-Lob::savefile() expects parameter 1 to be a valid path, string given in %snull_byte_1.php on line %d +NULL Test 2: Export -Warning: OCI-Lob::export(): Filename cannot contain null bytes in %snull_byte_1.php on line %d -bool(false) +Warning: OCI-Lob::export() expects parameter 1 to be a valid path, string given in %snull_byte_1.php on line %d +NULL ===DONE=== diff --git a/ext/oci8/tests/oci8safemode.phpt b/ext/oci8/tests/oci8safemode.phpt deleted file mode 100644 index 02e180e65..000000000 --- a/ext/oci8/tests/oci8safemode.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Test functionality disabled in safe mode ---SKIPIF-- -<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?> ---INI-- -safe_mode=On -oci8.privileged_connect=On ---FILE-- -<?php - -$c = oci_connect("hr", "hrpwd", "//localhost/XE", null, OCI_SYSDBA); - -$r = oci_password_change($c, "hr", "hrpwd", "hrpwd"); - -echo "Done\n"; -?> ---EXPECTF-- -%s: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 - -Warning: oci_connect(): Privileged connect is disabled in Safe Mode in %s on line %d - -Warning: oci_password_change(): is disabled in Safe Mode in %s on line %d -Done |