Skip to content
This repository
Browse code

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
  • Loading branch information...
commit 2e71ef8f261f9e8226fe5cb80f23f277dbe65944 1 parent f858ea3
Mark Story authored July 21, 2012
47  lib/Cake/Test/Fixture/CakeSessionFixture.php
... ...
@@ -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 notes on commit 2e71ef8

Please sign in to comment.
Something went wrong with that request. Please try again.