SluggedArticleFixture.php 885 B

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