NumberTreeFixture.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Tree behavior class.
  4. *
  5. * Enables a model object to act as a node-based tree.
  6. *
  7. * PHP 5
  8. *
  9. * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
  10. * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. *
  12. * Licensed under The MIT License
  13. * Redistributions of files must retain the above copyright notice
  14. *
  15. * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  16. * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
  17. * @package Cake.Test.Fixture
  18. * @since CakePHP(tm) v 1.2.0.5331
  19. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  20. */
  21. /**
  22. * Number Tree Test Fixture
  23. *
  24. * Generates a tree of data for use testing the tree behavior
  25. *
  26. * @package Cake.Test.Fixture
  27. */
  28. class NumberTreeFixture extends CakeTestFixture {
  29. /**
  30. * name property
  31. *
  32. * @var string 'NumberTree'
  33. */
  34. public $name = 'NumberTree';
  35. /**
  36. * fields property
  37. *
  38. * @var array
  39. */
  40. public $fields = array(
  41. 'id' => array('type' => 'integer','key' => 'primary'),
  42. 'name' => array('type' => 'string','null' => false),
  43. 'parent_id' => 'integer',
  44. 'lft' => array('type' => 'integer','null' => false),
  45. 'rght' => array('type' => 'integer','null' => false)
  46. );
  47. }