Skip to content

Commit 2e71ef8

Browse files
committed
Add CakeSession Fixture
CakePHP should provide a fixture for the default session table name so developers don't need to add the same fixture to each application. Fixes #3054
1 parent f858ea3 commit 2e71ef8

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
/**
3+
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
4+
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
5+
*
6+
* Licensed under The MIT License
7+
* Redistributions of files must retain the above copyright notice
8+
*
9+
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
10+
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
11+
* @package Cake.Test.Fixture
12+
* @since CakePHP(tm) v 2.3.0
13+
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
14+
*/
15+
16+
/**
17+
* Fixture class for the default session configuration
18+
*
19+
* @package Cake.Test.Fixture
20+
*/
21+
class CakeSessionFixture extends CakeTestFixture {
22+
23+
/**
24+
* name property
25+
*
26+
* @var string
27+
*/
28+
public $name = 'CakeSession';
29+
30+
/**
31+
* fields property
32+
*
33+
* @var array
34+
*/
35+
public $fields = array(
36+
'id' => array('type' => 'string', 'length' => 128, 'key' => 'primary'),
37+
'data' => array('type' => 'text','null' => true),
38+
'expires' => array('type' => 'integer', 'length' => 11, 'null' => true)
39+
);
40+
41+
/**
42+
* records property
43+
*
44+
* @var array
45+
*/
46+
public $records = array();
47+
}

0 commit comments

Comments
 (0)