SiteArticlesFixture.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * For full copyright and license information, please see the LICENSE.txt
  8. * Redistributions of files must retain the above copyright notice.
  9. *
  10. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. * @link http://cakephp.org CakePHP(tm) Project
  12. * @since 3.0.0
  13. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  14. */
  15. namespace Cake\Test\Fixture;
  16. use Cake\TestSuite\Fixture\TestFixture;
  17. class SiteArticlesFixture extends TestFixture
  18. {
  19. /**
  20. * fields property
  21. *
  22. * @var array
  23. */
  24. public $fields = [
  25. 'id' => ['type' => 'integer'],
  26. 'author_id' => ['type' => 'integer', 'null' => true],
  27. 'site_id' => ['type' => 'integer', 'null' => true],
  28. 'title' => ['type' => 'string', 'null' => true],
  29. 'body' => 'text',
  30. '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id', 'site_id']]]
  31. ];
  32. /**
  33. * records property
  34. *
  35. * @var array
  36. */
  37. public $records = [
  38. [
  39. 'id' => 1,
  40. 'author_id' => 1,
  41. 'site_id' => 1,
  42. 'title' => 'First Article',
  43. 'body' => 'First Article Body',
  44. ],
  45. [
  46. 'id' => 2,
  47. 'author_id' => 3,
  48. 'site_id' => 2,
  49. 'title' => 'Second Article',
  50. 'body' => 'Second Article Body',
  51. ],
  52. [
  53. 'id' => 3,
  54. 'author_id' => 1,
  55. 'site_id' => 2,
  56. 'title' => 'Third Article',
  57. 'body' => 'Third Article Body',
  58. ],
  59. [
  60. 'id' => 4,
  61. 'author_id' => 3,
  62. 'site_id' => 1,
  63. 'title' => 'Fourth Article',
  64. 'body' => 'Fourth Article Body',
  65. ]
  66. ];
  67. }