|
@@ -16,13 +16,14 @@ class TokensFixture extends TestFixture {
|
|
|
*/
|
|
*/
|
|
|
public $fields = [
|
|
public $fields = [
|
|
|
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10],
|
|
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10],
|
|
|
- 'user_id' => ['type' => 'string', 'null' => true, 'length' => 36, 'comment' => ''],
|
|
|
|
|
- 'type' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 10, 'comment' => 'e.g.:activate,reactivate'],
|
|
|
|
|
- 'key' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 60, 'comment' => ''],
|
|
|
|
|
- 'content' => ['type' => 'string', 'null' => true, 'default' => null, 'comment' => 'can transport some information'],
|
|
|
|
|
|
|
+ 'user_id' => ['type' => 'integer', 'null' => true, 'length' => 10, 'comment' => ''],
|
|
|
|
|
+ 'type' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 20, 'comment' => 'e.g.:activate,reactivate'],
|
|
|
|
|
+ 'token' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 60, 'comment' => ''],
|
|
|
|
|
+ 'content' => ['type' => 'string', 'null' => true, 'length' => 255, 'default' => null, 'comment' => 'can transport some information'],
|
|
|
'used' => ['type' => 'integer', 'null' => false, 'default' => '0', 'collate' => null, 'comment' => ''],
|
|
'used' => ['type' => 'integer', 'null' => false, 'default' => '0', 'collate' => null, 'comment' => ''],
|
|
|
'created' => ['type' => 'datetime', 'null' => true, 'default' => null, 'collate' => null, 'comment' => ''],
|
|
'created' => ['type' => 'datetime', 'null' => true, 'default' => null, 'collate' => null, 'comment' => ''],
|
|
|
'modified' => ['type' => 'datetime', 'null' => true, 'default' => null, 'collate' => null, 'comment' => ''],
|
|
'modified' => ['type' => 'datetime', 'null' => true, 'default' => null, 'collate' => null, 'comment' => ''],
|
|
|
|
|
+ 'unlimited' => ['type' => 'boolean', 'null' => false, 'default' => '0', 'comment' => ''],
|
|
|
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
|
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
|
|
];
|
|
];
|
|
|
|
|
|
|
@@ -33,94 +34,104 @@ class TokensFixture extends TestFixture {
|
|
|
*/
|
|
*/
|
|
|
public $records = [
|
|
public $records = [
|
|
|
[
|
|
[
|
|
|
- 'user_id' => '1',
|
|
|
|
|
|
|
+ 'user_id' => 1,
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => '7k8qdcizigtudvxn2v9zep',
|
|
|
|
|
|
|
+ 'token' => '7k8qdcizigtudvxn2v9zep',
|
|
|
'content' => 'i:1;',
|
|
'content' => 'i:1;',
|
|
|
'used' => 0,
|
|
'used' => 0,
|
|
|
'created' => '2011-08-02 18:00:41',
|
|
'created' => '2011-08-02 18:00:41',
|
|
|
'modified' => '2011-08-02 18:00:41',
|
|
'modified' => '2011-08-02 18:00:41',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
'user_id' => '2',
|
|
'user_id' => '2',
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => '23e32tpkcmdn8x9j8n0n00',
|
|
|
|
|
|
|
+ 'token' => '23e32tpkcmdn8x9j8n0n00',
|
|
|
'content' => 'i:2;',
|
|
'content' => 'i:2;',
|
|
|
'used' => 0,
|
|
'used' => 0,
|
|
|
'created' => '2011-08-02 18:00:41',
|
|
'created' => '2011-08-02 18:00:41',
|
|
|
'modified' => '2011-08-02 18:00:41',
|
|
'modified' => '2011-08-02 18:00:41',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
'user_id' => '1',
|
|
'user_id' => '1',
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => '3mpzed7eoewsjvyvg4vy35',
|
|
|
|
|
|
|
+ 'token' => '3mpzed7eoewsjvyvg4vy35',
|
|
|
'content' => 'a:3:{s:10:"controller";s:4:"test";s:6:"action";s:3:"foo";i:0;s:3:"bar";}',
|
|
'content' => 'a:3:{s:10:"controller";s:4:"test";s:6:"action";s:3:"foo";i:0;s:3:"bar";}',
|
|
|
'used' => 1,
|
|
'used' => 1,
|
|
|
'created' => '2011-08-02 18:00:41',
|
|
'created' => '2011-08-02 18:00:41',
|
|
|
'modified' => '2011-08-02 18:00:41',
|
|
'modified' => '2011-08-02 18:00:41',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
'user_id' => '2',
|
|
'user_id' => '2',
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => 'af8ww4y7jxzq5n6npmjpxx',
|
|
|
|
|
|
|
+ 'token' => 'af8ww4y7jxzq5n6npmjpxx',
|
|
|
'content' => 's:13:"/test/foo/bar";',
|
|
'content' => 's:13:"/test/foo/bar";',
|
|
|
'used' => 1,
|
|
'used' => 1,
|
|
|
'created' => '2011-08-02 18:00:41',
|
|
'created' => '2011-08-02 18:00:41',
|
|
|
'modified' => '2011-08-02 18:00:41',
|
|
'modified' => '2011-08-02 18:00:41',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
'user_id' => '1',
|
|
'user_id' => '1',
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => '2s7i3zjw0rn009j4no552b',
|
|
|
|
|
|
|
+ 'token' => '2s7i3zjw0rn009j4no552b',
|
|
|
'content' => 'i:1;',
|
|
'content' => 'i:1;',
|
|
|
'used' => 0,
|
|
'used' => 0,
|
|
|
'created' => '2011-08-02 18:01:16',
|
|
'created' => '2011-08-02 18:01:16',
|
|
|
'modified' => '2011-08-02 18:01:16',
|
|
'modified' => '2011-08-02 18:01:16',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
'user_id' => '2',
|
|
'user_id' => '2',
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => 'tro596dig63cay0ps09vre',
|
|
|
|
|
|
|
+ 'token' => 'tro596dig63cay0ps09vre',
|
|
|
'content' => 'i:2;',
|
|
'content' => 'i:2;',
|
|
|
'used' => 0,
|
|
'used' => 0,
|
|
|
'created' => '2011-08-02 18:01:16',
|
|
'created' => '2011-08-02 18:01:16',
|
|
|
'modified' => '2011-08-02 18:01:16',
|
|
'modified' => '2011-08-02 18:01:16',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
'user_id' => '1',
|
|
'user_id' => '1',
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => 'penfangwc40x550wwvgfmu',
|
|
|
|
|
|
|
+ 'token' => 'penfangwc40x550wwvgfmu',
|
|
|
'content' => 'a:3:{s:10:"controller";s:4:"test";s:6:"action";s:3:"foo";i:0;s:3:"bar";}',
|
|
'content' => 'a:3:{s:10:"controller";s:4:"test";s:6:"action";s:3:"foo";i:0;s:3:"bar";}',
|
|
|
'used' => 1,
|
|
'used' => 1,
|
|
|
'created' => '2011-08-02 18:01:16',
|
|
'created' => '2011-08-02 18:01:16',
|
|
|
'modified' => '2011-08-02 18:01:16',
|
|
'modified' => '2011-08-02 18:01:16',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
'user_id' => '2',
|
|
'user_id' => '2',
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => '2y7m5srasm3ozej0izxbhe',
|
|
|
|
|
|
|
+ 'token' => '2y7m5srasm3ozej0izxbhe',
|
|
|
'content' => 's:13:"/test/foo/bar";',
|
|
'content' => 's:13:"/test/foo/bar";',
|
|
|
'used' => 1,
|
|
'used' => 1,
|
|
|
'created' => '2011-08-02 18:01:16',
|
|
'created' => '2011-08-02 18:01:16',
|
|
|
'modified' => '2011-08-02 18:01:16',
|
|
'modified' => '2011-08-02 18:01:16',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
'user_id' => '1',
|
|
'user_id' => '1',
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => '5c6dp2w54ynxii2xo3c50m',
|
|
|
|
|
|
|
+ 'token' => '5c6dp2w54ynxii2xo3c50m',
|
|
|
'content' => 'i:1;',
|
|
'content' => 'i:1;',
|
|
|
'used' => 0,
|
|
'used' => 0,
|
|
|
'created' => '2011-08-02 18:01:54',
|
|
'created' => '2011-08-02 18:01:54',
|
|
|
'modified' => '2011-08-02 18:01:54',
|
|
'modified' => '2011-08-02 18:01:54',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
[
|
|
[
|
|
|
'user_id' => '2',
|
|
'user_id' => '2',
|
|
|
'type' => 'qlogin',
|
|
'type' => 'qlogin',
|
|
|
- 'key' => 'fr6a0d4waue2v6hmqeyek5',
|
|
|
|
|
|
|
+ 'token' => 'fr6a0d4waue2v6hmqeyek5',
|
|
|
'content' => 'i:2;',
|
|
'content' => 'i:2;',
|
|
|
'used' => 0,
|
|
'used' => 0,
|
|
|
'created' => '2011-08-02 18:01:54',
|
|
'created' => '2011-08-02 18:01:54',
|
|
|
'modified' => '2011-08-02 18:01:54',
|
|
'modified' => '2011-08-02 18:01:54',
|
|
|
|
|
+ 'unlimited' => false,
|
|
|
],
|
|
],
|
|
|
];
|
|
];
|
|
|
|
|
|