Skip to content

Commit

Permalink
Updating test case to use autoRegenerate.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 28, 2010
1 parent f5bf4c5 commit ef586d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
15 changes: 1 addition & 14 deletions cake/libs/cake_session.php
Expand Up @@ -503,19 +503,6 @@ public static function destroy() {
* Helper method to initialize a session, based on Cake core settings.
*
* Sessions can be configured with a few shortcut names as well as have any number of ini settings declared.
*
* ## Options
*
* - `Session.name` - The name of the cookie to use. Defaults to 'CAKEPHP'
* - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
* - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
* - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions?
* - `Session.defaults` - The default configuration set to use as a basis for your session.
* There are four builtins: php, cake, cache, database.
* - `Session.handler` - Can be used to enable a custom session handler. Expects an array of of callables,
* that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
* to the ini array.
* - `Session.ini` - An associative array of additional ini values to set.
*
* @return void
* @throws Exception Throws exceptions when ini_set() fails.
Expand Down Expand Up @@ -707,7 +694,7 @@ protected static function _checkValid() {
) {
$time = self::read('Config.time');
self::write('Config.time', self::$sessionTime);
if (isset($sessionConfig['harden']) && $sessionConfig['harden'] === true) {
if (isset($sessionConfig['autoRegenerate']) && $sessionConfig['autoRegenerate'] === true) {
$check = self::read('Config.countdown');
$check -= 1;
self::write('Config.countdown', $check);
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/cases/libs/cake_session.test.php
Expand Up @@ -718,7 +718,7 @@ function testReadAndWriteWithDatabaseStorage() {
*/
function testSessionTimeout() {
Configure::write('debug', 2);
Configure::write('Session.harden', false);
Configure::write('Session.autoRegenerate', false);

$timeoutSeconds = Configure::read('Session.timeout') * 60;

Expand Down

0 comments on commit ef586d9

Please sign in to comment.