summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-23 23:45:43 -0600
committerGitHub <noreply@github.com>2017-03-23 23:45:43 -0600
commit1397b84777b0507e2b2f9dcaebe2ca48698ebe74 (patch)
tree030970c8efb64bdd81d7da822e88012589a2c477 /tests
parentd197f609a896e6133797824fe700d9f92b2d1df8 (diff)
parent8a4466f9ae916b59a13c93ccabd2d01742e9597f (diff)
downloadnextcloud-server-1397b84777b0507e2b2f9dcaebe2ca48698ebe74.tar.gz
nextcloud-server-1397b84777b0507e2b2f9dcaebe2ca48698ebe74.zip
Merge pull request #3928 from nextcloud/downstream-17978
Adjust 4 byte MySQL code to upstream
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/DB/MDB2SchemaReaderTest.php2
-rw-r--r--tests/lib/DB/SchemaDiffTest.php4
-rw-r--r--tests/lib/Repair/RepairCollationTest.php4
3 files changed, 6 insertions, 4 deletions
diff --git a/tests/lib/DB/MDB2SchemaReaderTest.php b/tests/lib/DB/MDB2SchemaReaderTest.php
index dcec6ae593e..3daf0dd7589 100644
--- a/tests/lib/DB/MDB2SchemaReaderTest.php
+++ b/tests/lib/DB/MDB2SchemaReaderTest.php
@@ -47,7 +47,7 @@ class MDB2SchemaReaderTest extends TestCase {
public function testRead() {
$reader = new MDB2SchemaReader($this->getConfig(), new MySqlPlatform());
- $schema = $reader->loadSchemaFromFile(__DIR__ . '/testschema.xml');
+ $schema = $reader->loadSchemaFromFile(__DIR__ . '/testschema.xml', new Schema());
$this->assertCount(1, $schema->getTables());
$table = $schema->getTable('test_table');
diff --git a/tests/lib/DB/SchemaDiffTest.php b/tests/lib/DB/SchemaDiffTest.php
index 88c9abeb431..f74d800bfec 100644
--- a/tests/lib/DB/SchemaDiffTest.php
+++ b/tests/lib/DB/SchemaDiffTest.php
@@ -21,6 +21,7 @@
namespace Test\DB;
+use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\SchemaDiff;
use OC\DB\MDB2SchemaManager;
use OC\DB\MDB2SchemaReader;
@@ -79,7 +80,8 @@ class SchemaDiffTest extends TestCase {
$this->manager->createDbFromStructure($schemaFile);
$schemaReader = new MDB2SchemaReader($this->config, $this->connection->getDatabasePlatform());
- $endSchema = $schemaReader->loadSchemaFromFile($schemaFile);
+ $toSchema = new Schema([], [], $this->connection->getSchemaManager()->createSchemaConfig());
+ $endSchema = $schemaReader->loadSchemaFromFile($schemaFile, $toSchema);
// get the diff
/** @var SchemaDiff $diff */
diff --git a/tests/lib/Repair/RepairCollationTest.php b/tests/lib/Repair/RepairCollationTest.php
index 7ff069d37be..d84f689cc52 100644
--- a/tests/lib/Repair/RepairCollationTest.php
+++ b/tests/lib/Repair/RepairCollationTest.php
@@ -18,10 +18,10 @@ use Test\TestCase;
class TestCollationRepair extends Collation {
/**
- * @param \Doctrine\DBAL\Connection $connection
+ * @param IDBConnection $connection
* @return string[]
*/
- public function getAllNonUTF8BinTables($connection) {
+ public function getAllNonUTF8BinTables(IDBConnection $connection) {
return parent::getAllNonUTF8BinTables($connection);
}
}