[Pkg-owncloud-commits] [owncloud] 05/61: Adding test which breaks because bit and/or enum datatypes are used
David Prévot
taffit at moszumanska.debian.org
Thu Jul 31 03:51:41 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit f75f1b44123b2096b1a79be829383c61f21b4e52
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Thu Jul 24 12:10:05 2014 +0200
Adding test which breaks because bit and/or enum datatypes are used
---
tests/lib/db/migration.php | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/tests/lib/db/migration.php b/tests/lib/db/migration.php
new file mode 100644
index 0000000..820a143
--- /dev/null
+++ b/tests/lib/db/migration.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Copyright (c) 2014 Thomas Müller <deepdiver at owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+class TestMigration extends \PHPUnit_Framework_TestCase {
+
+ /** @var \Doctrine\DBAL\Connection */
+ private $connection;
+
+ /** @var string */
+ private $tableName;
+
+ public function setUp() {
+ $this->connection = \OC_DB::getConnection();
+ if (!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySqlPlatform) {
+ $this->markTestSkipped("Test only relevant on MySql");
+ }
+
+ $dbPrefix = \OC::$server->getConfig()->getSystemValue("dbtableprefix");
+ $this->tableName = uniqid($dbPrefix . "_enum_bit_test");
+ $this->connection->exec("CREATE TABLE $this->tableName(b BIT, e ENUM('1','2','3','4'))");
+ }
+
+ public function tearDown() {
+ $this->connection->getSchemaManager()->dropTable($this->tableName);
+ }
+
+ public function testNonOCTables() {
+ $manager = new \OC\DB\MDB2SchemaManager($this->connection);
+ $manager->updateDbFromStructure(__DIR__ . '/testschema.xml');
+
+ $this->assertTrue(true);
+ }
+
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list