DatatypeFixture.php 1.4 KB

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