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 = [
  13. 'id' => ['type' => 'integer', 'key' => 'primary'],
  14. 'article_id' => ['type' => 'integer', 'null' => true],
  15. 'user_id' => ['type' => 'integer', 'null' => true],
  16. 'comment' => 'text',
  17. 'status' => ['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 = [
  27. ['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. ['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. ['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. ['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. ['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. ['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. ['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. }