Skip to content
Permalink
Browse files

update more tests, DatatypeFixture

  • Loading branch information...
sebastienbarre committed Mar 6, 2017
1 parent c0ea3d0 commit 15a33eee06cf2eb022ca95a3126c532f0aad10ee
@@ -173,6 +173,9 @@ class TestAppSchema extends CakeSchema {
'float_field' => array('type' => 'float', 'null' => false, 'length' => '5,2', 'default' => ''),
'decimal_field' => array('type' => 'decimal', 'length' => '6,3', 'default' => '0.000'),
'huge_int' => array('type' => 'biginteger'),
'normal_int' => array('type' => 'integer'),
'small_int' => array('type' => 'smallint'),
'tiny_int' => array('type' => 'tinyint'),
'bool' => array('type' => 'boolean', 'null' => false, 'default' => false),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => true)),
'tableParameters' => array()
@@ -405,6 +405,24 @@ public function testDatatypes() {
'default' => null,
'length' => 20,
),
'normal_int' => array(
'type' => 'integer',
'null' => true,
'default' => null,
'length' => null
),
'small_int' => array(
'type' => 'integer',
'null' => true,
'default' => null,
'length' => null
),
'tiny_int' => array(
'type' => 'integer',
'null' => true,
'default' => null,
'length' => null
),
'bool' => array(
'type' => 'boolean',
'null' => false,
@@ -33,6 +33,9 @@ class DatatypeFixture extends CakeTestFixture {
'float_field' => array('type' => 'float', 'length' => '5,2', 'null' => false, 'default' => null),
'decimal_field' => array('type' => 'decimal', 'length' => '6,3', 'default' => '0.000'),
'huge_int' => array('type' => 'biginteger'),
'normal_int' => array('type' => 'integer'),
'small_int' => array('type' => 'smallint'),
'tiny_int' => array('type' => 'tinyint'),
'bool' => array('type' => 'boolean', 'null' => false, 'default' => false),
);
@@ -42,6 +45,14 @@ class DatatypeFixture extends CakeTestFixture {
* @var array
*/
public $records = array(
array('id' => 1, 'float_field' => 42.23, 'huge_int' => '1234567891234567891', 'bool' => 0),
array(
'id' => 1,
'float_field' => 42.23,
'huge_int' => '9223372036854775807',
'normal_int' => 2147483647,
'small_int' => 32767,
'tiny_int' => 127,
'bool' => 0
),
);
}

0 comments on commit 15a33ee

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.