Upgrade CakePHP from 2.2.5 to 2.9.5

This commit is contained in:
Brm Ko 2017-02-26 15:29:44 +01:00
parent 5a580df460
commit 235a541597
793 changed files with 60746 additions and 23753 deletions

View file

@ -2,25 +2,29 @@
/**
* CacheSessionTest
*
* PHP 5
*
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Test.Case.Model.Datasource.Session
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
App::uses('CakeSession', 'Model/Datasource');
App::uses('CacheSession', 'Model/Datasource/Session');
class_exists('CakeSession');
/**
* CacheSessionTest
*
* @package Cake.Test.Case.Model.Datasource.Session
*/
class CacheSessionTest extends CakeTestCase {
protected static $_sessionBackup;
@ -35,7 +39,7 @@ class CacheSessionTest extends CakeTestCase {
'engine' => 'File',
'prefix' => 'session_test_'
));
self::$_sessionBackup = Configure::read('Session');
static::$_sessionBackup = Configure::read('Session');
Configure::write('Session.handler.config', 'session_test');
}
@ -49,7 +53,7 @@ class CacheSessionTest extends CakeTestCase {
Cache::clear(false, 'session_test');
Cache::drop('session_test');
Configure::write('Session', self::$_sessionBackup);
Configure::write('Session', static::$_sessionBackup);
}
/**
@ -100,6 +104,8 @@ class CacheSessionTest extends CakeTestCase {
public function testRead() {
$this->storage->write('test_one', 'Some other value');
$this->assertEquals('Some other value', $this->storage->read('test_one'), 'Incorrect value.');
$this->storage->write('test_two', 0);
$this->assertEquals(0, $this->storage->read('test_two'));
}
/**
@ -114,4 +120,4 @@ class CacheSessionTest extends CakeTestCase {
$this->assertFalse(Cache::read('test_one', 'session_test'), 'Value stuck around.');
}
}
}