SluggedArticlesFixture.php 905 B

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