SluggedArticlesFixture.php 910 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Tools\Test\Fixture;
  3. use Cake\TestSuite\Fixture\TestFixture;
  4. class SluggedArticlesFixture extends TestFixture {
  5. /**
  6. * fields property
  7. *
  8. * @var array
  9. */
  10. public array $fields = [
  11. 'id' => ['type' => 'integer'],
  12. 'title' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => ''],
  13. 'slug' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => ''],
  14. 'long_title' => ['type' => 'string', 'null' => false, 'default' => ''],
  15. 'long_slug' => ['type' => 'string', 'null' => false, 'default' => ''],
  16. 'section' => ['type' => 'integer', 'null' => true],
  17. '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
  18. ];
  19. /**
  20. * records property
  21. *
  22. * @var array
  23. */
  24. public array $records = [
  25. [
  26. 'title' => 'Foo',
  27. 'slug' => 'foo',
  28. 'long_title' => 'Foo Bar',
  29. 'long_slug' => 'foo-bar',
  30. 'section' => null,
  31. ],
  32. ];
  33. }