LogableLogFixture.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. class LogableLogFixture extends CakeTestFixture {
  3. public $fields = array(
  4. 'id' => array('type' => 'integer', 'key' => 'primary'),
  5. 'title' => array(
  6. 'type' => 'string',
  7. 'length' => 255,
  8. 'null' => false),
  9. 'description' => array(
  10. 'type' => 'string',
  11. 'length' => 255,
  12. 'null' => false),
  13. 'model' => array(
  14. 'type' => 'string',
  15. 'length' => 255,
  16. 'null' => false),
  17. 'foreign_id' => array('type' => 'integer', 'null' => false),
  18. 'action' => array(
  19. 'type' => 'string',
  20. 'length' => 25,
  21. 'null' => false),
  22. 'user_id' => array('type' => 'integer', 'null' => false),
  23. 'change' => array(
  24. 'type' => 'string',
  25. 'length' => 255,
  26. 'null' => false),
  27. 'created' => array('type' => 'datetime', 'null' => false, 'default' => null, 'collate' => null, 'comment' => ''),
  28. 'modified' => array('type' => 'datetime', 'null' => false, 'default' => null, 'collate' => null, 'comment' => ''),
  29. 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
  30. 'tableParameters' => array()
  31. );
  32. public $records = array(
  33. array(
  34. 'id' => 1,
  35. 'title' => 'Fifth Book',
  36. 'description' => 'LogableBook "Fifth Book" (6) created by LogableUser "Alexander" (66).',
  37. 'model' => 'LogableBook',
  38. 'foreign_id' => 6,
  39. 'action' => 'add',
  40. 'user_id' => 66,
  41. 'change' => 'title'),
  42. array(
  43. 'id' => 2,
  44. 'title' => 'Fifth Book',
  45. 'description' => 'LogableBook "Fifth Book" (6) updated by LogableUser "Alexander" (66).',
  46. 'model' => 'LogableBook',
  47. 'foreign_id' => 6,
  48. 'action' => 'edit',
  49. 'user_id' => 66,
  50. 'change' => 'title'),
  51. array(
  52. 'id' => 3,
  53. 'title' => 'Steven',
  54. 'description' => 'User "Steven" (301) updated by LogableUser "Steven" (301).',
  55. 'model' => 'LogableUser',
  56. 'foreign_id' => 301,
  57. 'action' => 'edit',
  58. 'user_id' => 301,
  59. 'change' => 'name'),
  60. array(
  61. 'id' => 4,
  62. 'title' => 'Fifth Book',
  63. 'description' => 'LogableBook "Fifth Book" (6) deleted by LogableUser "Alexander" (66).',
  64. 'model' => 'LogableBook',
  65. 'foreign_id' => 6,
  66. 'action' => 'delete',
  67. 'user_id' => 66,
  68. 'change' => ''),
  69. array(
  70. 'id' => 5,
  71. 'title' => 'New Book',
  72. 'description' => 'LogableBook "New Book" (7) added by LogableUser "Steven" (301).',
  73. 'model' => 'LogableBook',
  74. 'foreign_id' => 7,
  75. 'action' => 'add',
  76. 'user_id' => 301,
  77. 'change' => 'title'),
  78. );
  79. }