summaryrefslogtreecommitdiff
path: root/ext/session
diff options
context:
space:
mode:
Diffstat (limited to 'ext/session')
-rw-r--r--ext/session/tests/rfc1867_invalid_settings-win.phpt19
-rw-r--r--ext/session/tests/rfc1867_invalid_settings.phpt6
-rw-r--r--ext/session/tests/rfc1867_invalid_settings_2-win.phpt19
-rw-r--r--ext/session/tests/rfc1867_invalid_settings_2.phpt6
-rw-r--r--ext/session/tests/session_set_save_handler_class_002.phpt2
-rw-r--r--ext/session/tests/session_set_save_handler_iface_001.phpt2
-rw-r--r--ext/session/tests/session_set_save_handler_iface_002.phpt2
7 files changed, 51 insertions, 5 deletions
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 0000000000..ed854e8898
--- /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 d954563b03..640c4d2436 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 0000000000..f8e6b6d208
--- /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 544510eefd..c2a0c6ac4e 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 9d5f732b53..6fb831f695 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 c8199ffe31..39a4b9975b 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 42e8fbe3fd..40c9ac6825 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;