com php-src: Fix bug 61786 Failing tests in ext\session\tests\*: ext/session/tests/rfc1867_invalid_settings-win.ph pt
ext/session/tests/rfc1867_invalid_settings.p hpt ext/session/tests/rfc1867_invalid_settings_ 2-win.phpt ext/session/tests/rfc1867_invalid_
settings_2.phpt ext/session/tests/session_set_save _handler_class_002.phpt ext/session/tests/sessi on_set_save_handler_iface_001.phpt ext/sess
ion/tests/session_set_save_handler_iface_002. phpt
| From: | Anatoliy Belsky | Date: | Thu, 26 Apr 2012 13:39:45 +0000 |
| Subject: | com php-src: Fix bug 61786 Failing tests in ext\session\tests\*: ext/session/tests/rfc1867_invalid_settings-win.ph pt ext/session/tests/rfc1867_invalid_settings.p hpt ext/session/tests/rfc1867_invalid_settings_ 2-win.phpt ext/session/tests/rfc1867_invalid_ settings_2.phpt ext/session/tests/session_set_save _handler_class_002.phpt ext/session/tests/sessi on_set_save_handler_iface_001.phpt ext/sess ion/tests/session_set_save_handler_iface_002. phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68879@lists.php.net to get a copy of this message | ||
Commit: 3dbe48762fedfefeebd253da96fc84ad669fc10d
Author: Anatoliy Belsky <ab@php.net> Thu, 26 Apr 2012 15:39:45 +0200
Parents: 94d96f77826e46f114d4bc1777e1edcdfef002a2
Branches: PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3dbe48762fedfefeebd253da96fc84ad669fc10d
Log:
Fix bug 61786 Failing tests in ext\session\tests\*
Bugs:
https://bugs.php.net/61786
Changed paths:
A ext/session/tests/rfc1867_invalid_settings-win.phpt
M ext/session/tests/rfc1867_invalid_settings.phpt
A ext/session/tests/rfc1867_invalid_settings_2-win.phpt
M ext/session/tests/rfc1867_invalid_settings_2.phpt
M ext/session/tests/session_set_save_handler_class_002.phpt
M ext/session/tests/session_set_save_handler_iface_001.phpt
M ext/session/tests/session_set_save_handler_iface_002.phpt
Diff:
diff --git a/ext/session/tests/rfc1867_invalid_settings-win.phpt
b/ext/session/tests/rfc1867_invalid_settings-win.phpt
new file mode 100644
index 0000000..ed854e8
--- /dev/null
+++ b/ext/session/tests/rfc1867_invalid_settings-win.phpt
@@ -0,0 +1,19 @@
+--TEST--
+session rfc1867 invalid settings
+--INI--
+session.upload_progress.freq=-1
+error_log=
+--SKIPIF--
+<?php
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) != "WIN")
+ die("skip windows only test");
+?>
+--FILE--
+<?php
+var_dump(ini_get("session.upload_progress.freq"));
+?>
+--EXPECTF--
+Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s
+string(2) "1%"
+PHP Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s
diff --git a/ext/session/tests/rfc1867_invalid_settings.phpt
b/ext/session/tests/rfc1867_invalid_settings.phpt
index d954563..640c4d2 100644
--- a/ext/session/tests/rfc1867_invalid_settings.phpt
+++ b/ext/session/tests/rfc1867_invalid_settings.phpt
@@ -4,7 +4,11 @@ session rfc1867 invalid settings
session.upload_progress.freq=-1
error_log=
--SKIPIF--
-<?php include('skipif.inc'); ?>
+<?php
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) == "WIN")
+ die("skip Not for Windows");
+?>
--FILE--
<?php
var_dump(ini_get("session.upload_progress..freq"));
diff --git a/ext/session/tests/rfc1867_invalid_settings_2-win.phpt
b/ext/session/tests/rfc1867_invalid_settings_2-win.phpt
new file mode 100644
index 0000000..f8e6b6d
--- /dev/null
+++ b/ext/session/tests/rfc1867_invalid_settings_2-win.phpt
@@ -0,0 +1,19 @@
+--TEST--
+session rfc1867 invalid settings 2
+--INI--
+session.upload_progress.freq=200%
+error_log=
+--SKIPIF--
+<?php
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) != "WIN")
+ die("skip windows only test");
+?>
+--FILE--
+<?php
+var_dump(ini_get("session.upload_progress.freq"));
+?>
+--EXPECTF--
+Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s
+string(2) "1%"
+PHP Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s
diff --git a/ext/session/tests/rfc1867_invalid_settings_2.phpt
b/ext/session/tests/rfc1867_invalid_settings_2.phpt
index 544510e..c2a0c6a 100644
--- a/ext/session/tests/rfc1867_invalid_settings_2.phpt
+++ b/ext/session/tests/rfc1867_invalid_settings_2.phpt
@@ -4,7 +4,11 @@ session rfc1867 invalid settings 2
session.upload_progress.freq=200%
error_log=
--SKIPIF--
-<?php include('skipif.inc'); ?>
+<?php
+include('skipif.inc');
+if(substr(PHP_OS, 0, 3) == "WIN")
+ die("skip Not for Windows");
+?>
--FILE--
<?php
var_dump(ini_get("session.upload_progress.freq"));
diff --git a/ext/session/tests/session_set_save_handler_class_002.phpt
b/ext/session/tests/session_set_save_handler_class_002.phpt
index 9d5f732..6fb831f 100644
--- a/ext/session/tests/session_set_save_handler_class_002.phpt
+++ b/ext/session/tests/session_set_save_handler_class_002..phpt
@@ -23,7 +23,7 @@ class MySession2 extends SessionHandler {
public function open($path, $name) {
if (!$path) {
- $path = '/tmp';
+ $path = sys_get_temp_dir();
}
$this->path = $path . '/u_sess_' . $name;
return true;
diff --git a/ext/session/tests/session_set_save_handler_iface_001.phpt
b/ext/session/tests/session_set_save_handler_iface_001.phpt
index c8199ff..39a4b99 100644
--- a/ext/session/tests/session_set_save_handler_iface_001.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_001.phpt
@@ -23,7 +23,7 @@ class MySession2 implements SessionHandlerInterface {
public function open($path, $name) {
if (!$path) {
- $path = '/tmp';
+ $path = sys_get_temp_dir();
}
$this->path = $path . '/u_sess_' . $name;
return true;
diff --git a/ext/session/tests/session_set_save_handler_iface_002.phpt
b/ext/session/tests/session_set_save_handler_iface_002.phpt
index 42e8fbe..40c9ac6 100644
--- a/ext/session/tests/session_set_save_handler_iface_002.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_002.phpt
@@ -32,7 +32,7 @@ class MySession2 implements MySessionHandlerInterface {
public function open($path, $name) {
if (!$path) {
- $path = '/tmp';
+ $path = sys_get_temp_dir();
}
$this->path = $path . '/u_sess_' . $name;
return true;