UnderscoreFieldFixture.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Short description for file.
  4. *
  5. * PHP 5
  6. *
  7. * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
  8. * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  9. *
  10. * Licensed under The MIT License
  11. * Redistributions of files must retain the above copyright notice
  12. *
  13. * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  14. * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
  15. * @package Cake.Test.Fixture
  16. * @since CakePHP(tm) v 1.2.0.4667
  17. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  18. */
  19. /**
  20. * UnderscoreFieldFixture class
  21. *
  22. * @package Cake.Test.Fixture
  23. */
  24. class UnderscoreFieldFixture extends CakeTestFixture {
  25. /**
  26. * name property
  27. *
  28. * @var string 'UnderscoreField'
  29. */
  30. public $name = 'UnderscoreField';
  31. /**
  32. * fields property
  33. *
  34. * @var array
  35. */
  36. public $fields = array(
  37. 'id' => array('type' => 'integer', 'key' => 'primary'),
  38. 'user_id' => array('type' => 'integer', 'null' => false),
  39. 'my_model_has_a_field' => array('type' => 'string', 'null' => false),
  40. 'body_field' => 'text',
  41. 'published' => array('type' => 'string', 'length' => 1, 'default' => 'N'),
  42. 'another_field' => array('type' => 'integer', 'length' => 3),
  43. );
  44. /**
  45. * records property
  46. *
  47. * @var array
  48. */
  49. public $records = array(
  50. array('user_id' => 1, 'my_model_has_a_field' => 'First Article', 'body_field' => 'First Article Body', 'published' => 'Y', 'another_field' => 2),
  51. array('user_id' => 3, 'my_model_has_a_field' => 'Second Article', 'body_field' => 'Second Article Body', 'published' => 'Y', 'another_field' => 3),
  52. array('user_id' => 1, 'my_model_has_a_field' => 'Third Article', 'body_field' => 'Third Article Body', 'published' => 'Y', 'another_field' => 5),
  53. );
  54. }