ResetCommentsFixture.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace Tools\Test\Fixture;
  3. use Cake\TestSuite\Fixture\TestFixture;
  4. /**
  5. * For ResetBehavior
  6. */
  7. class ResetCommentsFixture extends TestFixture {
  8. /**
  9. * fields property
  10. *
  11. * @var array
  12. */
  13. public $fields = array(
  14. 'id' => ['type' => 'integer'],
  15. 'article_id' => ['type' => 'integer', 'null' => false],
  16. 'user_id' => ['type' => 'integer', 'null' => false],
  17. 'comment' => 'text',
  18. 'published' => ['type' => 'string', 'length' => 1, 'default' => 'N'],
  19. 'created' => 'datetime',
  20. 'updated' => 'datetime',
  21. '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
  22. );
  23. /**
  24. * records property
  25. *
  26. * @var array
  27. */
  28. public $records = array(
  29. array('article_id' => 1, 'user_id' => 2, 'comment' => 'First Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:45:23', 'updated' => '2007-03-18 10:47:31'),
  30. array('article_id' => 1, 'user_id' => 4, 'comment' => 'Second Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:47:23', 'updated' => '2007-03-18 10:49:31'),
  31. array('article_id' => 1, 'user_id' => 1, 'comment' => 'Third Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:49:23', 'updated' => '2007-03-18 10:51:31'),
  32. array('article_id' => 1, 'user_id' => 1, 'comment' => 'Fourth Comment for First Article', 'published' => 'N', 'created' => '2007-03-18 10:51:23', 'updated' => '2007-03-18 10:53:31'),
  33. array('article_id' => 2, 'user_id' => 1, 'comment' => 'First Comment for Second Article', 'published' => 'Y', 'created' => '2007-03-18 10:53:23', 'updated' => '2007-03-18 10:55:31'),
  34. array('article_id' => 2, 'user_id' => 2, 'comment' => 'Second Comment for Second Article', 'published' => 'Y', 'created' => '2007-03-18 10:55:23', 'updated' => '2007-03-18 10:57:31')
  35. );
  36. }