diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-12-02 13:51:36 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-12-03 12:10:55 +0100 |
commit | ea4c25609dd23345fa1f639479421ff318e6f6c9 (patch) | |
tree | 835bd7798a9b0cd4bb8dc5cf2bd4054775a89a67 /tests/lib/repair | |
parent | e9029f94cb6eb9b37623ea1a2faf8aac11675900 (diff) | |
download | nextcloud-server-ea4c25609dd23345fa1f639479421ff318e6f6c9.tar.gz nextcloud-server-ea4c25609dd23345fa1f639479421ff318e6f6c9.zip |
Replace uniqid calls with $this->getUniqueID so tests pass again on windows
Diffstat (limited to 'tests/lib/repair')
-rw-r--r-- | tests/lib/repair/repaircollation.php | 2 | ||||
-rw-r--r-- | tests/lib/repair/repairinnodb.php | 2 | ||||
-rw-r--r-- | tests/lib/repair/repairlegacystorage.php | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/tests/lib/repair/repaircollation.php b/tests/lib/repair/repaircollation.php index e711fcd9d83..29dad190008 100644 --- a/tests/lib/repair/repaircollation.php +++ b/tests/lib/repair/repaircollation.php @@ -53,7 +53,7 @@ class TestRepairCollation extends \Test\TestCase { } $dbPrefix = $this->config->getSystemValue("dbtableprefix"); - $this->tableName = uniqid($dbPrefix . "_collation_test"); + $this->tableName = $this->getUniqueID($dbPrefix . "_collation_test"); $this->connection->exec("CREATE TABLE $this->tableName(text VARCHAR(16)) COLLATE utf8_unicode_ci"); $this->repair = new TestCollationRepair($this->config, $this->connection); diff --git a/tests/lib/repair/repairinnodb.php b/tests/lib/repair/repairinnodb.php index 21d7d978821..d4039472a6b 100644 --- a/tests/lib/repair/repairinnodb.php +++ b/tests/lib/repair/repairinnodb.php @@ -31,7 +31,7 @@ class TestRepairInnoDB extends \Test\TestCase { } $dbPrefix = \OC::$server->getConfig()->getSystemValue("dbtableprefix"); - $this->tableName = uniqid($dbPrefix . "_innodb_test"); + $this->tableName = $this->getUniqueID($dbPrefix . "_innodb_test"); $this->connection->exec("CREATE TABLE $this->tableName(id INT) ENGINE MyISAM"); $this->repair = new \OC\Repair\InnoDB(); diff --git a/tests/lib/repair/repairlegacystorage.php b/tests/lib/repair/repairlegacystorage.php index ac845657cd9..f08393300e1 100644 --- a/tests/lib/repair/repairlegacystorage.php +++ b/tests/lib/repair/repairlegacystorage.php @@ -13,6 +13,8 @@ */ class TestRepairLegacyStorages extends \Test\TestCase { + private $connection; + private $config; private $user; private $repair; @@ -247,12 +249,12 @@ class TestRepairLegacyStorages extends \Test\TestCase { // regular data dir array( '/tmp/oc-autotest/datadir/', - uniqid('user_'), + $this->getUniqueID('user_'), ), // long datadir / short user array( '/tmp/oc-autotest/datadir01234567890123456789012345678901234567890123456789END/', - uniqid('user_'), + $this->getUniqueID('user_'), ), // short datadir / long user array( @@ -271,7 +273,7 @@ class TestRepairLegacyStorages extends \Test\TestCase { $output[] = 'info: ' . $description; }); - $this->prepareSettings('/tmp/oc-autotest/datadir', uniqid('user_')); + $this->prepareSettings('/tmp/oc-autotest/datadir', $this->getUniqueID('user_')); $this->assertNotEquals('yes', $this->config->getAppValue('core', 'repairlegacystoragesdone')); $this->repair->run(); $this->assertEquals(1, count($output)); |