KeyValueFixture.php 1.4 KB

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