MessageFixture.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Copyright (c) 2008, Andy Dawson
  4. *
  5. * Licensed under The MIT License
  6. * Redistributions of files must retain the above copyright notice.
  7. *
  8. * @copyright Copyright (c) 2008, Andy Dawson
  9. * @link www.ad7six.com
  10. * @since v 1.0
  11. * @modifiedBy $LastChangedBy$
  12. * @lastModified $Date$
  13. * @license http://opensource.org/licenses/mit-license.php MIT
  14. */
  15. /**
  16. * MessageFixture class
  17. *
  18. */
  19. class MessageFixture extends CakeTestFixture {
  20. /**
  21. * Fields property
  22. *
  23. * @var array
  24. */
  25. public $fields = [
  26. 'id' => ['type' => 'integer', 'key' => 'primary'],
  27. 'random' => ['type' => 'integer', 'null' => false],
  28. 'name' => ['type' => 'string', 'null' => false],
  29. 'slug' => ['type' => 'string', 'null' => true],
  30. 'section' => ['type' => 'integer', 'null' => true],
  31. ];
  32. /**
  33. * Records property
  34. *
  35. * The records are created out of sequence so that theirs id are not sequncial.
  36. * The order field values are used only in the list behavior test
  37. *
  38. * @var array
  39. */
  40. public $records = [
  41. ['random' => 1, 'name' => 'First'],
  42. ['random' => 10, 'name' => 'Tenth'],
  43. ['random' => 4, 'name' => 'Fourth'],
  44. ['random' => 8, 'name' => 'Eigth'],
  45. ['random' => 5, 'name' => 'Fifth'],
  46. ['random' => 7, 'name' => 'Seventh'],
  47. ['random' => 3, 'name' => 'Third'],
  48. ['random' => 9, 'name' => 'Ninth'],
  49. ['random' => 2, 'name' => 'Second'],
  50. ['random' => 6, 'name' => 'Sixth'],
  51. ];
  52. }