From 5fcbe5350c88d5949fd7fd0fdb654707d9e42d5f Mon Sep 17 00:00:00 2001 From: Oliver Gasser Date: Tue, 17 Dec 2013 23:08:05 +0100 Subject: [PATCH] Add decimal(precision,scale) column to unit tests --- tests/lib/db/mdb2schemareader.php | 3 +++ tests/lib/db/testschema.xml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/tests/lib/db/mdb2schemareader.php b/tests/lib/db/mdb2schemareader.php index 57cafa7c76b..faa3b8d7da0 100644 --- a/tests/lib/db/mdb2schemareader.php +++ b/tests/lib/db/mdb2schemareader.php @@ -69,6 +69,9 @@ class MDB2SchemaReader extends \PHPUnit_Framework_TestCase { $this->assertTrue($table->getColumn('booleanfield_true')->getDefault()); $this->assertFalse($table->getColumn('booleanfield_false')->getDefault()); + $this->assertEquals(12, $table->getColumn('decimalfield_precision_scale')->getPrecision()); + $this->assertEquals(2, $table->getColumn('decimalfield_precision_scale')->getScale()); + $this->assertCount(2, $table->getIndexes()); $this->assertEquals(array('integerfield'), $table->getIndex('primary')->getUnquotedColumns()); $this->assertTrue($table->getIndex('primary')->isPrimary()); diff --git a/tests/lib/db/testschema.xml b/tests/lib/db/testschema.xml index 509b55ee81f..9de804b9290 100644 --- a/tests/lib/db/testschema.xml +++ b/tests/lib/db/testschema.xml @@ -53,6 +53,12 @@ boolean false + + decimalfield_precision_scale + decimal + 12 + 2 + index_primary -- 2.39.5