ArticlesFixture.php 947 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Tools\Test\Fixture;
  3. use Cake\TestSuite\Fixture\TestFixture;
  4. /**
  5. * Short description for class.
  6. */
  7. class ArticlesFixture extends TestFixture {
  8. /**
  9. * fields property
  10. *
  11. * @var array
  12. */
  13. public array $fields = [
  14. 'id' => ['type' => 'integer'],
  15. 'author_id' => ['type' => 'integer', 'null' => true],
  16. 'title' => ['type' => 'string', 'null' => true],
  17. 'body' => 'text',
  18. 'published' => ['type' => 'string', 'length' => 1, 'default' => 'N'],
  19. '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
  20. ];
  21. /**
  22. * records property
  23. *
  24. * @var array
  25. */
  26. public array $records = [
  27. ['author_id' => 1, 'title' => 'First Article', 'body' => 'First Article Body', 'published' => 'Y'],
  28. ['author_id' => 3, 'title' => 'Second Article', 'body' => 'Second Article Body', 'published' => 'Y'],
  29. ['author_id' => 1, 'title' => 'Third Article', 'body' => 'Third Article Body', 'published' => 'Y'],
  30. ];
  31. }