AfterTreesFixture.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. *
  5. * Licensed under The MIT License
  6. * For full copyright and license information, please see the LICENSE.txt
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  10. * @link http://www.cakephp.org
  11. * @since 1.2.0
  12. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  13. */
  14. namespace Cake\Test\Fixture;
  15. use Cake\TestSuite\Fixture\TestFixture;
  16. /**
  17. * AfterTreeFixture class
  18. *
  19. */
  20. class AfterTreesFixture extends TestFixture {
  21. /**
  22. * fields property
  23. *
  24. * @var array
  25. */
  26. public $fields = array(
  27. 'id' => ['type' => 'integer'],
  28. 'parent_id' => ['type' => 'integer'],
  29. 'lft' => ['type' => 'integer'],
  30. 'rght' => ['type' => 'integer'],
  31. 'name' => ['type' => 'string', 'length' => 255, 'null' => false],
  32. '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
  33. );
  34. /**
  35. * records property
  36. *
  37. * @var array
  38. */
  39. public $records = array(
  40. array('parent_id' => null, 'lft' => 1, 'rght' => 2, 'name' => 'One'),
  41. array('parent_id' => null, 'lft' => 3, 'rght' => 4, 'name' => 'Two'),
  42. array('parent_id' => null, 'lft' => 5, 'rght' => 6, 'name' => 'Three'),
  43. array('parent_id' => null, 'lft' => 7, 'rght' => 12, 'name' => 'Four'),
  44. array('parent_id' => null, 'lft' => 8, 'rght' => 9, 'name' => 'Five'),
  45. array('parent_id' => null, 'lft' => 10, 'rght' => 11, 'name' => 'Six'),
  46. array('parent_id' => null, 'lft' => 13, 'rght' => 14, 'name' => 'Seven')
  47. );
  48. }