ProductFixture.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * Short description for file.
  4. *
  5. * PHP 5
  6. *
  7. * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
  8. * Copyright 2005-2011, 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-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
  14. * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
  15. * @package cake.tests.fixtures
  16. * @since CakePHP(tm) v 1.2.0.4667
  17. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  18. */
  19. /**
  20. * Short description for class.
  21. *
  22. * @package cake.tests.fixtures
  23. */
  24. class ProductFixture extends CakeTestFixture {
  25. /**
  26. * name property
  27. *
  28. * @var string 'Product'
  29. * @access public
  30. */
  31. public $name = 'Product';
  32. /**
  33. * fields property
  34. *
  35. * @var array
  36. * @access public
  37. */
  38. public $fields = array(
  39. 'id' => array('type' => 'integer', 'key' => 'primary'),
  40. 'name' => array('type' => 'string', 'length' => 255, 'null' => false),
  41. 'type' => array('type' => 'string', 'length' => 255, 'null' => false),
  42. 'price' => array('type' => 'integer', 'null' => false)
  43. );
  44. /**
  45. * records property
  46. *
  47. * @var array
  48. * @access public
  49. */
  50. public $records = array(
  51. array('name' => 'Park\'s Great Hits', 'type' => 'Music', 'price' => 19),
  52. array('name' => 'Silly Puddy', 'type' => 'Toy', 'price' => 3),
  53. array('name' => 'Playstation', 'type' => 'Toy', 'price' => 89),
  54. array('name' => 'Men\'s T-Shirt', 'type' => 'Clothing', 'price' => 32),
  55. array('name' => 'Blouse', 'type' => 'Clothing', 'price' => 34),
  56. array('name' => 'Electronica 2002', 'type' => 'Music', 'price' => 4),
  57. array('name' => 'Country Tunes', 'type' => 'Music', 'price' => 21),
  58. array('name' => 'Watermelon', 'type' => 'Food', 'price' => 9)
  59. );
  60. }