[Pkg-owncloud-commits] [owncloud] 49/103: *cough*
David Prévot
taffit at moszumanska.debian.org
Sun May 31 12:32:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.4RC1
in repository owncloud.
commit c501ca9ba45229c9c2febeaab54c1cddddfe65fd
Author: Joas Schilling <nickvergessen at owncloud.com>
Date: Tue Mar 24 16:25:54 2015 +0100
*cough*
---
apps/files_sharing/lib/external/manager.php | 2 +-
apps/files_sharing/tests/external/manager.php | 17 +++++++++++++----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/external/manager.php
index 5234684..1d937c2 100644
--- a/apps/files_sharing/lib/external/manager.php
+++ b/apps/files_sharing/lib/external/manager.php
@@ -368,7 +368,7 @@ class Manager {
$query = 'SELECT * FROM `*PREFIX*share_external` WHERE `user` = ?';
$parameters = [$this->uid];
if (!is_null($accepted)) {
- $query .= 'AND `accepted` = ?';
+ $query .= ' AND `accepted` = ?';
$parameters[] = (int) $accepted;
}
$query .= ' ORDER BY `id` ASC';
diff --git a/apps/files_sharing/tests/external/manager.php b/apps/files_sharing/tests/external/manager.php
index dcb3dfb..3f8ac95 100644
--- a/apps/files_sharing/tests/external/manager.php
+++ b/apps/files_sharing/tests/external/manager.php
@@ -21,7 +21,7 @@
namespace OCA\Files_sharing\Tests\External;
use OC\Files\Storage\StorageFactory;
-use Test\TestCase;
+use OCA\Files_Sharing\Tests\TestCase;
class Manager extends TestCase {
private $uid;
@@ -37,14 +37,23 @@ class Manager extends TestCase {
private $instance;
public function setUp() {
- $this->uid = uniqid();
+ parent::setUp();
+
+ $this->uid = $this->getUniqueID('user');
+
$this->mountManager = new \OC\Files\Mount\Manager();
- $this->instance = new \OCA\Files_Sharing\External\Manager(\OC::$server->getDatabaseConnection(),
- $this->mountManager, new StorageFactory(), \OC::$server->getHTTPHelper(), $this->uid);
+ $this->instance = new \OCA\Files_Sharing\External\Manager(
+ \OC::$server->getDatabaseConnection(),
+ $this->mountManager,
+ new StorageFactory(),
+ $this->getMockBuilder('\OC\HTTPHelper')->disableOriginalConstructor()->getMock(),
+ $this->uid
+ );
}
public function tearDown() {
$this->instance->removeUserShares($this->uid);
+ parent::tearDown();
}
private function getFullPath($path) {
--
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