Skip to content

Commit

Permalink
Fix session test failures as reported by Antony Dovgal.
Browse files Browse the repository at this point in the history
These were caused by the tests assuming default values for some session
configuration settings, in particular session.save_path and session.name.
The tests now explicitly set these settings in the --INI-- section.
  • Loading branch information
Ant Phillips committed Apr 30, 2008
1 parent 3946b47 commit ab211d7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ext/session/tests/session_id_variation1.phpt
Expand Up @@ -35,12 +35,12 @@ ob_end_flush();
string(1) "0"
string(0) ""
bool(true)
string(32) "%s"
string(%d) "%s"
bool(true)
string(1) "0"
string(0) ""
bool(true)
string(40) "%s"
string(%d) "%s"
bool(true)
Done

4 changes: 2 additions & 2 deletions ext/session/tests/session_id_variation2.phpt
Expand Up @@ -45,12 +45,12 @@ string(1) "0"
string(1) "0"
string(0) ""
bool(true)
string(32) "%s"
string(%d) "%s"
bool(true)
string(1) "0"
string(0) ""
bool(true)
string(40) "%s"
string(%d) "%s"
bool(true)
bool(true)
Done
Expand Down
2 changes: 2 additions & 0 deletions ext/session/tests/session_save_path_variation4.phpt
Expand Up @@ -8,6 +8,8 @@ if(substr(PHP_OS, 0, 3) != "WIN")
--INI--
open_basedir=.
session.save_handler=files
session.save_path=
session.name=PHPSESSID
--FILE--
<?php

Expand Down
7 changes: 7 additions & 0 deletions ext/session/tests/session_save_path_variation5.phpt
Expand Up @@ -8,6 +8,8 @@ if(substr(PHP_OS, 0, 3) == "WIN")
--INI--
open_basedir=.
session.save_handler=files
session.save_path=
session.name=PHPSESSID
--FILE--
<?php

Expand All @@ -25,6 +27,11 @@ $sessions = ($directory."/sessions");

chdir($directory);

// Delete the existing directory
if (file_exists($sessions) === TRUE) {
@rmdir($sessions);
}

var_dump(mkdir($sessions));
var_dump(chdir($sessions));
ini_set("session.save_path", $directory);
Expand Down
2 changes: 2 additions & 0 deletions ext/session/tests/session_set_save_handler_variation4.phpt
Expand Up @@ -6,6 +6,8 @@ Test session_set_save_handler() function : variation
session.gc_probability=1
session.gc_divisor=1
session.gc_maxlifetime=0
session.save_path=
session.name=PHPSESSID
--FILE--
<?php

Expand Down

0 comments on commit ab211d7

Please sign in to comment.