1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00

Fix bug 61786 Failing tests in ext\session\tests\*

This commit is contained in:
Anatoliy Belsky
2012-04-26 15:39:45 +02:00
parent 94d96f7782
commit 3dbe48762f
7 changed files with 51 additions and 5 deletions

View File

@@ -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

View File

@@ -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"));

View File

@@ -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

View File

@@ -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"));

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;