SiteArticleFixture.php 1.6 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 SiteArticleFixture extends TestFixture {
  18. /**
  19. * fields property
  20. *
  21. * @var array
  22. */
  23. public $fields = [
  24. 'id' => ['type' => 'integer'],
  25. 'author_id' => ['type' => 'integer', 'null' => true],
  26. 'site_id' => ['type' => 'integer', 'null' => true],
  27. 'title' => ['type' => 'string', 'null' => true],
  28. 'body' => 'text',
  29. '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id', 'site_id']]]
  30. ];
  31. /**
  32. * records property
  33. *
  34. * @var array
  35. */
  36. public $records = [
  37. [
  38. 'id' => 1,
  39. 'author_id' => 1,
  40. 'site_id' => 1,
  41. 'title' => 'First Article',
  42. 'body' => 'First Article Body',
  43. ],
  44. [
  45. 'id' => 2,
  46. 'author_id' => 3,
  47. 'site_id' => 2,
  48. 'title' => 'Second Article',
  49. 'body' => 'Second Article Body',
  50. ],
  51. [
  52. 'id' => 3,
  53. 'author_id' => 1,
  54. 'site_id' => 2,
  55. 'title' => 'Third Article',
  56. 'body' => 'Third Article Body',
  57. ],
  58. [
  59. 'id' => 4,
  60. 'author_id' => 3,
  61. 'site_id' => 1,
  62. 'title' => 'Fourth Article',
  63. 'body' => 'Fourth Article Body',
  64. ]
  65. ];
  66. }