LogableLogFixture.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. class LogableLogFixture extends CakeTestFixture {
  3. public $fields = [
  4. 'id' => ['type' => 'integer', 'key' => 'primary'],
  5. 'title' => [
  6. 'type' => 'string',
  7. 'length' => 255,
  8. 'null' => false],
  9. 'description' => [
  10. 'type' => 'string',
  11. 'length' => 255,
  12. 'null' => false],
  13. 'model' => [
  14. 'type' => 'string',
  15. 'length' => 255,
  16. 'null' => false],
  17. 'foreign_id' => ['type' => 'integer', 'null' => true],
  18. 'action' => [
  19. 'type' => 'string',
  20. 'length' => 25,
  21. 'null' => false],
  22. 'user_id' => ['type' => 'integer', 'null' => true],
  23. 'change' => [
  24. 'type' => 'string',
  25. 'length' => 255,
  26. 'null' => false],
  27. 'created' => ['type' => 'datetime', 'null' => true, 'default' => null, 'collate' => null, 'comment' => ''],
  28. 'modified' => ['type' => 'datetime', 'null' => true, 'default' => null, 'collate' => null, 'comment' => ''],
  29. 'indexes' => ['PRIMARY' => ['column' => 'id', 'unique' => 1]],
  30. 'tableParameters' => []
  31. ];
  32. public $records = [
  33. [
  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. [
  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. [
  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. [
  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. [
  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. }