Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
1bd141b6
Commit
1bd141b6
authored
Mar 24, 2015
by
Robin Appelman
Browse files
Merge pull request #15158 from owncloud/fix-failing-master
Fix failing master unit tests
parents
2370af62
7de15f31
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/files_sharing/lib/external/manager.php
View file @
1bd141b6
...
...
@@ -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'
;
...
...
apps/files_sharing/tests/external/manager.php
View file @
1bd141b6
...
...
@@ -21,7 +21,7 @@
namespace
OCA\Files_sharing\Tests\External
;
use
OC\Files\Storage\StorageFactory
;
use
Test\TestCase
;
use
OCA\Files_Sharing
\
Test
s
\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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment