Skip to content

Commit

Permalink
Add tests covering small/tiny integer in save operations.
Browse files Browse the repository at this point in the history
Gain integration coverage for small/tiny integer types.
  • Loading branch information
markstory committed May 29, 2017
1 parent cb22e32 commit c8925db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/Fixture/DatatypesFixture.php
Expand Up @@ -29,6 +29,8 @@ class DatatypesFixture extends TestFixture
'id' => ['type' => 'biginteger'],
'cost' => ['type' => 'decimal', 'length' => 20, 'precision' => 0, 'null' => true],
'floaty' => ['type' => 'float', 'null' => true],
'small' => ['type' => 'smallinteger', 'null' => true],
'tiny' => ['type' => 'tinyinteger', 'null' => true],
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
];

Expand Down
3 changes: 3 additions & 0 deletions tests/TestCase/ORM/QueryTest.php
Expand Up @@ -3030,6 +3030,9 @@ public function testSelectLargeNumbers()
$table = TableRegistry::get('Datatypes');
$entity = $table->newEntity([]);
$entity->cost = $big;
$entity->tiny = 1;
$entity->small = 10;

$table->save($entity);
$out = $table->find()->where([
'cost' => $big
Expand Down

0 comments on commit c8925db

Please sign in to comment.