summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-17 11:10:21 +0100
committerGitHub <noreply@github.com>2017-03-17 11:10:21 +0100
commitc65848effebfbcd46ef55d75f73b137b504e8ad9 (patch)
tree6765c52f7c970bcf7d4a58fb08e89ef022a6e664 /tests
parent3f331e02f99d7943c091f2fa3598769100e008d1 (diff)
parent2ccf544ad7c8bfc54600adb065156f04a8912c9f (diff)
downloadnextcloud-server-c65848effebfbcd46ef55d75f73b137b504e8ad9.tar.gz
nextcloud-server-c65848effebfbcd46ef55d75f73b137b504e8ad9.zip
Merge pull request #3878 from nextcloud/downstream-26303
Fixed failing test which was ignoring a required (not null) column
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/DB/ConnectionTest.php3
-rw-r--r--tests/lib/DB/MDB2SchemaReaderTest.php6
-rw-r--r--tests/lib/DB/testschema.xml3
3 files changed, 5 insertions, 7 deletions
diff --git a/tests/lib/DB/ConnectionTest.php b/tests/lib/DB/ConnectionTest.php
index b9c55c23339..2a0cd70f83a 100644
--- a/tests/lib/DB/ConnectionTest.php
+++ b/tests/lib/DB/ConnectionTest.php
@@ -124,8 +124,7 @@ class ConnectionTest extends \Test\TestCase {
$this->connection->setValues('table', [
'integerfield' => 1
], [
- 'textfield' => 'foo',
- 'clobfield' => 'not_null'
+ 'textfield' => 'foo'
]);
$this->connection->setValues('table', [
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());
diff --git a/tests/lib/DB/testschema.xml b/tests/lib/DB/testschema.xml
index dfca920a0ef..8e6dc1a1d60 100644
--- a/tests/lib/DB/testschema.xml
+++ b/tests/lib/DB/testschema.xml
@@ -17,7 +17,7 @@
<type>integer</type>
<default>0</default>
<notnull>true</notnull>
- <autoincrement>1</autoincrement>
+ <primary>true</primary>
<length>4</length>
</field>
<field>
@@ -37,7 +37,6 @@
<field>
<name>clobfield</name>
<type>clob</type>
- <notnull>true</notnull>
</field>
<field>
<name>booleanfield</name>