summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/updater.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-26 09:29:28 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-26 09:29:28 +0100
commitcbfd16089b8c4317dc831dbab52f36f2ad60c5c0 (patch)
tree4599078118bc9aa6b502973bb202f41124657136 /apps/files_sharing/tests/updater.php
parentec9260647a5ec0bb62065eba6bfa004b6d2c696c (diff)
downloadnextcloud-server-cbfd16089b8c4317dc831dbab52f36f2ad60c5c0.tar.gz
nextcloud-server-cbfd16089b8c4317dc831dbab52f36f2ad60c5c0.zip
Fixed share upgrade cleanup tests to use the correct ids
Diffstat (limited to 'apps/files_sharing/tests/updater.php')
-rw-r--r--apps/files_sharing/tests/updater.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/files_sharing/tests/updater.php b/apps/files_sharing/tests/updater.php
index 993bf0169e7..79ae4879b64 100644
--- a/apps/files_sharing/tests/updater.php
+++ b/apps/files_sharing/tests/updater.php
@@ -31,22 +31,22 @@ class Test_Files_Sharing_Updater extends \PHPUnit_Framework_TestCase {
$this->tearDown();
// add items except one - because this is the test case for the broken share table
- $addItems = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache` (`fileid`, `storage`, `path_hash`, ' .
+ $addItems = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache` (`storage`, `path_hash`, ' .
'`parent`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`) ' .
- 'VALUES (?, 1, ?, 1, 1, 1, 1, 1, 1)');
+ 'VALUES (1, ?, 1, 1, 1, 1, 1, 1)');
$items = array(1, 3);
$fileIds = array();
foreach($items as $item) {
- // the number is used as file_id and path_hash
- $addItems->execute(array($item, $item));
+ // the number is used as path_hash
+ $addItems->execute(array($item));
$fileIds[] = \OC_DB::insertId('*PREFIX*filecache');
}
- $addShares = \OC_DB::prepare('INSERT INTO `*PREFIX*share` (`file_source`, `id`, `item_type`, `uid_owner`) VALUES (?, ?, \'file\', 1)');
- // the number is used as item_source and id
- $addShares->execute(array(1, $fileIds[0]));
- $addShares->execute(array(2, 200)); // id of "deleted" file
- $addShares->execute(array(3, $fileIds[1]));
+ $addShares = \OC_DB::prepare('INSERT INTO `*PREFIX*share` (`file_source`, `item_type`, `uid_owner`) VALUES (?, \'file\', 1)');
+ // the number is used as item_source
+ $addShares->execute(array($fileIds[0]));
+ $addShares->execute(array(200)); // id of "deleted" file
+ $addShares->execute(array($fileIds[1]));
}
function tearDown() {