From c8925dbbf02b84e0483438e911fc8acf2f903ac4 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 28 May 2017 22:10:58 -0400 Subject: [PATCH] Add tests covering small/tiny integer in save operations. Gain integration coverage for small/tiny integer types. --- tests/Fixture/DatatypesFixture.php | 2 ++ tests/TestCase/ORM/QueryTest.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tests/Fixture/DatatypesFixture.php b/tests/Fixture/DatatypesFixture.php index 90089c3381d..9f9306e958b 100644 --- a/tests/Fixture/DatatypesFixture.php +++ b/tests/Fixture/DatatypesFixture.php @@ -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']]] ]; diff --git a/tests/TestCase/ORM/QueryTest.php b/tests/TestCase/ORM/QueryTest.php index 598bf2d0811..8a4b3f038cf 100644 --- a/tests/TestCase/ORM/QueryTest.php +++ b/tests/TestCase/ORM/QueryTest.php @@ -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