ArrayUserFixture.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * User Fixture
  4. *
  5. * PHP 5
  6. *
  7. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  8. * Copyright 2005-2010, 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-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
  14. * @link http://cakephp.org CakePHP(tm) Project
  15. * @since CakePHP Datasources v 0.3
  16. * @license http://opensource.org/licenses/mit-license.php MIT
  17. */
  18. /**
  19. * User Fixture
  20. *
  21. */
  22. class ArrayUserFixture extends CakeTestFixture {
  23. /**
  24. * Fields
  25. *
  26. * @var array
  27. */
  28. public $fields = [
  29. 'id' => ['type' => 'integer', 'key' => 'primary'],
  30. 'born_id' => ['type' => 'integer', 'null' => true],
  31. 'name' => ['type' => 'string', 'null' => false]
  32. ];
  33. /**
  34. * Records
  35. *
  36. * @var array
  37. */
  38. public $records = [
  39. ['born_id' => 1, 'name' => 'User 1'],
  40. ['born_id' => 2, 'name' => 'User 2'],
  41. ['born_id' => 1, 'name' => 'User 3'],
  42. ['born_id' => 3, 'name' => 'User 4']
  43. ];
  44. }