KeyValueFixture.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * KeyValueFixture
  4. *
  5. */
  6. class KeyValueFixture extends CakeTestFixture {
  7. /**
  8. * Fields
  9. *
  10. * @var array
  11. */
  12. public $fields = [
  13. 'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'],
  14. 'foreign_id' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 36, 'key' => 'index', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'],
  15. 'key' => ['type' => 'string', 'null' => false, 'default' => null, 'length' => 30, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'],
  16. 'value' => ['type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_unicode_ci', 'comment' => 'option setting', 'charset' => 'utf8'],
  17. 'created' => ['type' => 'datetime', 'null' => true, 'default' => null],
  18. 'modified' => ['type' => 'datetime', 'null' => true, 'default' => null],
  19. 'indexes' => [
  20. 'PRIMARY' => ['column' => 'id', 'unique' => 1]
  21. ],
  22. 'tableParameters' => ['charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM']
  23. ];
  24. /**
  25. * Records
  26. *
  27. * @var array
  28. */
  29. public $records = [
  30. [
  31. 'id' => 1,
  32. 'foreign_id' => '1',
  33. 'key' => 'User.registered',
  34. 'value' => 'yes',
  35. 'created' => '2012-08-08 01:26:50',
  36. 'modified' => '2012-08-08 01:26:50'
  37. ],
  38. ];
  39. }