SluggedArticleFixture.php 882 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Fixture to test SluggedBeavior
  4. */
  5. class SluggedArticleFixture extends CakeTestFixture {
  6. /**
  7. * Fields
  8. *
  9. * @var array
  10. */
  11. public $fields = [
  12. 'id' => ['type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'primary', 'collate' => null],
  13. 'title' => ['type' => 'string', 'null' => false, 'length' => 255],
  14. 'slug' => ['type' => 'string', 'null' => false, 'length' => 245],
  15. 'long_title' => ['type' => 'string', 'null' => false],
  16. 'long_slug' => ['type' => 'string', 'null' => false],
  17. 'section' => ['type' => 'integer', 'null' => true],
  18. 'indexes' => ['PRIMARY' => ['column' => 'id', 'unique' => 1]],
  19. 'tableParameters' => []
  20. ];
  21. /**
  22. * Records
  23. *
  24. * @var array
  25. */
  26. public $records = [
  27. [
  28. 'id' => '1',
  29. 'title' => 'Foo',
  30. 'slug' => 'foo',
  31. 'long_title' => 'Foo Bar',
  32. 'long_slug' => 'foo-bar',
  33. 'section' => 1,
  34. ],
  35. ];
  36. }