From: Oliver Gasser Date: Tue, 17 Dec 2013 22:08:05 +0000 (+0100) Subject: Add decimal(precision,scale) column to unit tests X-Git-Tag: v7.0.0alpha2~1010^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5fcbe5350c88d5949fd7fd0fdb654707d9e42d5f;p=nextcloud-server.git Add decimal(precision,scale) column to unit tests --- 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