SluggedArticleFixture.php 582 B

12345678910111213141516171819202122232425262728293031323334
  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', 'null' => false],
  17. 'slug' => ['type' => 'string', 'null' => false],
  18. '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
  19. );
  20. /**
  21. * records property
  22. *
  23. * @var array
  24. */
  25. public $records = array(
  26. array('title' => 'Foo', 'slug' => 'foo'),
  27. );
  28. }