mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-08-04 07:03:41 +02:00
Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
parent
5a580df460
commit
235a541597
793 changed files with 60746 additions and 23753 deletions
|
@ -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.');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue