DatatypeFixture.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * Short description for file.
  4. *
  5. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  6. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  7. *
  8. * Licensed under The MIT License
  9. * For full copyright and license information, please see the LICENSE.txt
  10. * Redistributions of files must retain the above copyright notice.
  11. *
  12. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  13. * @link http://cakephp.org CakePHP(tm) Project
  14. * @since CakePHP(tm) v 1.2.0.7026
  15. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  16. */
  17. namespace Cake\Test\Fixture;
  18. use Cake\TestSuite\Fixture\TestFixture;
  19. /**
  20. * Short description for class.
  21. *
  22. */
  23. class DatatypeFixture extends TestFixture {
  24. /**
  25. * Fields property
  26. *
  27. * @var array
  28. */
  29. public $fields = array(
  30. 'id' => ['type' => 'integer', 'null' => false],
  31. 'decimal_field' => ['type' => 'decimal', 'length' => '6', 'precision' => 3, 'default' => '0.000'],
  32. 'float_field' => ['type' => 'float', 'length' => '5,2', 'null' => false, 'default' => null],
  33. 'huge_int' => ['type' => 'biginteger'],
  34. 'bool' => ['type' => 'boolean', 'null' => false, 'default' => false],
  35. '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
  36. );
  37. /**
  38. * Records property
  39. *
  40. * @var array
  41. */
  42. public $records = array(
  43. array('id' => 1, 'float_field' => 42.23, 'huge_int' => '1234567891234567891', 'bool' => 0),
  44. );
  45. }