aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/DB/MDB2SchemaReaderTest.php
diff options
context:
space:
mode:
authorPhilipp Schaffrath <github@philipp.schaffrath.email>2017-01-10 12:10:36 +0100
committerMorris Jobke <hey@morrisjobke.de>2017-03-17 00:09:07 -0600
commit2ccf544ad7c8bfc54600adb065156f04a8912c9f (patch)
tree02e8efd96ba96be842ec092bbfa2c80c9873ec7f /tests/lib/DB/MDB2SchemaReaderTest.php
parent39afcbd49feb4ba333746762fe7c9d4701db9860 (diff)
downloadnextcloud-server-2ccf544ad7c8bfc54600adb065156f04a8912c9f.tar.gz
nextcloud-server-2ccf544ad7c8bfc54600adb065156f04a8912c9f.zip
Fixed failing test which was ignoring a required (not null) column (#26303)
* Fixed failing test which was ignoring a required (not null) column * restored test to original, catching DriverException which also catches ConstraintViolationException * catch ConstraintViolationException again * removed unnecessary field from this test * clobfield should be nullable * clobfield now is nullable * removed autoincrement since whenever this strategy is enabled, oracle would not throw constraint violation exceptions (needed for setValues), which mysql still does * this field does not auto increment anymore * mark integerfield as primary, since it is not getting marked as such through auto increment anymore, integerfield default always has been 0 instead of null Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/lib/DB/MDB2SchemaReaderTest.php')
-rw-r--r--tests/lib/DB/MDB2SchemaReaderTest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/DB/MDB2SchemaReaderTest.php b/tests/lib/DB/MDB2SchemaReaderTest.php
index 22c0ba28569..c740eb97f4b 100644
--- a/tests/lib/DB/MDB2SchemaReaderTest.php
+++ b/tests/lib/DB/MDB2SchemaReaderTest.php
@@ -42,8 +42,8 @@ class MDB2SchemaReaderTest extends \Test\TestCase {
$this->assertCount(8, $table->getColumns());
$this->assertEquals(4, $table->getColumn('integerfield')->getLength());
- $this->assertTrue($table->getColumn('integerfield')->getAutoincrement());
- $this->assertNull($table->getColumn('integerfield')->getDefault());
+ $this->assertFalse($table->getColumn('integerfield')->getAutoincrement());
+ $this->assertEquals(0, $table->getColumn('integerfield')->getDefault());
$this->assertTrue($table->getColumn('integerfield')->getNotnull());
$this->assertInstanceOf('Doctrine\DBAL\Types\IntegerType', $table->getColumn('integerfield')->getType());
@@ -58,7 +58,7 @@ class MDB2SchemaReaderTest extends \Test\TestCase {
$this->assertNull($table->getColumn('clobfield')->getLength());
$this->assertFalse($table->getColumn('clobfield')->getAutoincrement());
$this->assertNull($table->getColumn('clobfield')->getDefault());
- $this->assertTrue($table->getColumn('clobfield')->getNotnull());
+ $this->assertFalse($table->getColumn('clobfield')->getNotnull());
$this->assertInstanceOf('Doctrine\DBAL\Types\TextType', $table->getColumn('clobfield')->getType());
$this->assertNull($table->getColumn('booleanfield')->getLength());