TokensFixture.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php
  2. namespace Tools\Test\Fixture;
  3. use Cake\TestSuite\Fixture\TestFixture;
  4. /**
  5. * TokenFixture
  6. */
  7. class TokensFixture extends TestFixture {
  8. /**
  9. * Fields
  10. *
  11. * @var array
  12. */
  13. public $fields = [
  14. 'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10],
  15. 'user_id' => ['type' => 'string', 'null' => true, 'length' => 36, 'comment' => ''],
  16. 'type' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 10, 'comment' => 'e.g.:activate,reactivate'],
  17. 'key' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 60, 'comment' => ''],
  18. 'content' => ['type' => 'string', 'null' => true, 'default' => null, 'comment' => 'can transport some information'],
  19. 'used' => ['type' => 'integer', 'null' => false, 'default' => '0', 'collate' => null, 'comment' => ''],
  20. 'created' => ['type' => 'datetime', 'null' => true, 'default' => null, 'collate' => null, 'comment' => ''],
  21. 'modified' => ['type' => 'datetime', 'null' => true, 'default' => null, 'collate' => null, 'comment' => ''],
  22. '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
  23. ];
  24. /**
  25. * Records
  26. *
  27. * @var array
  28. */
  29. public $records = [
  30. [
  31. 'user_id' => '1',
  32. 'type' => 'qlogin',
  33. 'key' => '7k8qdcizigtudvxn2v9zep',
  34. 'content' => 'i:1;',
  35. 'used' => 0,
  36. 'created' => '2011-08-02 18:00:41',
  37. 'modified' => '2011-08-02 18:00:41',
  38. ],
  39. [
  40. 'user_id' => '2',
  41. 'type' => 'qlogin',
  42. 'key' => '23e32tpkcmdn8x9j8n0n00',
  43. 'content' => 'i:2;',
  44. 'used' => 0,
  45. 'created' => '2011-08-02 18:00:41',
  46. 'modified' => '2011-08-02 18:00:41',
  47. ],
  48. [
  49. 'user_id' => '1',
  50. 'type' => 'qlogin',
  51. 'key' => '3mpzed7eoewsjvyvg4vy35',
  52. 'content' => 'a:3:{s:10:"controller";s:4:"test";s:6:"action";s:3:"foo";i:0;s:3:"bar";}',
  53. 'used' => 1,
  54. 'created' => '2011-08-02 18:00:41',
  55. 'modified' => '2011-08-02 18:00:41',
  56. ],
  57. [
  58. 'user_id' => '2',
  59. 'type' => 'qlogin',
  60. 'key' => 'af8ww4y7jxzq5n6npmjpxx',
  61. 'content' => 's:13:"/test/foo/bar";',
  62. 'used' => 1,
  63. 'created' => '2011-08-02 18:00:41',
  64. 'modified' => '2011-08-02 18:00:41',
  65. ],
  66. [
  67. 'user_id' => '1',
  68. 'type' => 'qlogin',
  69. 'key' => '2s7i3zjw0rn009j4no552b',
  70. 'content' => 'i:1;',
  71. 'used' => 0,
  72. 'created' => '2011-08-02 18:01:16',
  73. 'modified' => '2011-08-02 18:01:16',
  74. ],
  75. [
  76. 'user_id' => '2',
  77. 'type' => 'qlogin',
  78. 'key' => 'tro596dig63cay0ps09vre',
  79. 'content' => 'i:2;',
  80. 'used' => 0,
  81. 'created' => '2011-08-02 18:01:16',
  82. 'modified' => '2011-08-02 18:01:16',
  83. ],
  84. [
  85. 'user_id' => '1',
  86. 'type' => 'qlogin',
  87. 'key' => 'penfangwc40x550wwvgfmu',
  88. 'content' => 'a:3:{s:10:"controller";s:4:"test";s:6:"action";s:3:"foo";i:0;s:3:"bar";}',
  89. 'used' => 1,
  90. 'created' => '2011-08-02 18:01:16',
  91. 'modified' => '2011-08-02 18:01:16',
  92. ],
  93. [
  94. 'user_id' => '2',
  95. 'type' => 'qlogin',
  96. 'key' => '2y7m5srasm3ozej0izxbhe',
  97. 'content' => 's:13:"/test/foo/bar";',
  98. 'used' => 1,
  99. 'created' => '2011-08-02 18:01:16',
  100. 'modified' => '2011-08-02 18:01:16',
  101. ],
  102. [
  103. 'user_id' => '1',
  104. 'type' => 'qlogin',
  105. 'key' => '5c6dp2w54ynxii2xo3c50m',
  106. 'content' => 'i:1;',
  107. 'used' => 0,
  108. 'created' => '2011-08-02 18:01:54',
  109. 'modified' => '2011-08-02 18:01:54',
  110. ],
  111. [
  112. 'user_id' => '2',
  113. 'type' => 'qlogin',
  114. 'key' => 'fr6a0d4waue2v6hmqeyek5',
  115. 'content' => 'i:2;',
  116. 'used' => 0,
  117. 'created' => '2011-08-02 18:01:54',
  118. 'modified' => '2011-08-02 18:01:54',
  119. ],
  120. ];
  121. }