BitmaskedCommentFixture.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * For BitmaskedBehaviorTest
  4. *
  5. */
  6. class BitmaskedCommentFixture extends CakeTestFixture {
  7. /**
  8. * Fields property
  9. *
  10. * @var array
  11. */
  12. public $fields = array(
  13. 'id' => array('type' => 'integer', 'key' => 'primary'),
  14. 'article_id' => array('type' => 'integer', 'null' => false),
  15. 'user_id' => array('type' => 'integer', 'null' => false),
  16. 'comment' => 'text',
  17. 'status' => array('type' => 'integer', 'null' => false, 'length' => 2, 'default' => '0'),
  18. 'created' => 'datetime',
  19. 'updated' => 'datetime'
  20. );
  21. /**
  22. * Records property
  23. *
  24. * @var array
  25. */
  26. public $records = array(
  27. array('article_id' => 1, 'user_id' => 2, 'comment' => 'First Comment for First Article', 'status' => '0', 'created' => '2007-03-18 10:45:23', 'updated' => '2007-03-18 10:47:31'),
  28. array('article_id' => 1, 'user_id' => 4, 'comment' => 'Second Comment for First Article', 'status' => '1', 'created' => '2007-03-18 10:47:23', 'updated' => '2007-03-18 10:49:31'),
  29. array('article_id' => 1, 'user_id' => 1, 'comment' => 'Third Comment for First Article', 'status' => '2', 'created' => '2007-03-18 10:49:23', 'updated' => '2007-03-18 10:51:31'),
  30. array('article_id' => 1, 'user_id' => 1, 'comment' => 'Fourth Comment for First Article', 'status' => '3', 'created' => '2007-03-18 10:51:23', 'updated' => '2007-03-18 10:53:31'),
  31. array('article_id' => 2, 'user_id' => 1, 'comment' => 'First Comment for Second Article', 'status' => '4', 'created' => '2007-03-18 10:53:23', 'updated' => '2007-03-18 10:55:31'),
  32. array('article_id' => 2, 'user_id' => 2, 'comment' => 'Second Comment for Second Article', 'status' => '5', 'created' => '2007-03-18 10:55:23', 'updated' => '2007-03-18 10:57:31'),
  33. array('article_id' => 2, 'user_id' => 3, 'comment' => 'Comment With All Bits set', 'status' => '15', 'created' => '2007-03-18 10:55:23', 'updated' => '2007-03-18 10:57:31')
  34. );
  35. }