DataFixture.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Tools\Test\Fixture;
  3. use Cake\TestSuite\Fixture\TestFixture;
  4. class DataFixture extends TestFixture {
  5. /**
  6. * Fields
  7. *
  8. * @var array
  9. */
  10. public array $fields = [
  11. 'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
  12. 'name' => ['type' => 'string', 'length' => 50, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
  13. 'data_json' => ['type' => 'text', 'length' => 16777215, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
  14. 'data_array' => ['type' => 'text', 'length' => 16777215, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
  15. '_constraints' => [
  16. 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
  17. ],
  18. ];
  19. /**
  20. * Records
  21. *
  22. * @var array
  23. */
  24. public array $records = [
  25. [
  26. 'name' => 'Lorem ipsum dolor sit amet',
  27. 'data_json' => null,
  28. 'data_array' => null,
  29. ],
  30. ];
  31. }