Skip to content
GitLab
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
0e85618c
Commit
0e85618c
authored
Jun 02, 2014
by
ringmaster
Committed by
Thomas Müller
Jun 04, 2014
Browse files
Can't use assertInstanceOf on wrapped storage; use assertTrue(instanceOfStorage() instead.
parent
48eb0515
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/lib/files/filesystem.php
View file @
0e85618c
...
...
@@ -173,7 +173,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$homeMount
=
\
OC\Files\Filesystem
::
getStorage
(
'/'
.
$userId
.
'/'
);
$this
->
assert
I
nstanceOf
(
'\OC\Files\Storage\Local'
,
$homeMount
);
$this
->
assert
True
(
$homeMount
->
i
nstanceOf
Storage
(
'\OC\Files\Storage\Local'
)
);
$this
->
assertEquals
(
'local::'
.
$datadir
.
'/'
.
$userId
.
'/'
,
$homeMount
->
getId
());
}
...
...
@@ -189,7 +189,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$homeMount
=
\
OC\Files\Filesystem
::
getStorage
(
'/'
.
$userId
.
'/'
);
$this
->
assert
I
nstanceOf
(
'\OC\Files\Storage\Home'
,
$homeMount
);
$this
->
assert
True
(
$homeMount
->
i
nstanceOf
Storage
(
'\OC\Files\Storage\Home'
)
);
$this
->
assertEquals
(
'home::'
.
$userId
,
$homeMount
->
getId
());
\
OC_User
::
deleteUser
(
$userId
);
...
...
@@ -214,7 +214,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$homeMount
=
\
OC\Files\Filesystem
::
getStorage
(
'/'
.
$userId
.
'/'
);
$this
->
assert
I
nstanceOf
(
'\OC\Files\Storage\Home'
,
$homeMount
);
$this
->
assert
True
(
$homeMount
->
i
nstanceOf
Storage
(
'\OC\Files\Storage\Home'
)
);
$this
->
assertEquals
(
'local::'
.
$datadir
.
'/'
.
$userId
.
'/'
,
$homeMount
->
getId
());
\
OC_User
::
deleteUser
(
$userId
);
...
...
@@ -244,7 +244,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
\
OC\Files\Filesystem
::
getMountPoint
(
'/'
.
$userId
.
'/cache'
)
);
list
(
$storage
,
$internalPath
)
=
\
OC\Files\Filesystem
::
resolvePath
(
'/'
.
$userId
.
'/cache'
);
$this
->
assert
I
nstanceOf
(
'\OC\Files\Storage\Home'
,
$storage
);
$this
->
assert
True
(
$storage
->
i
nstanceOf
Storage
(
'\OC\Files\Storage\Home'
)
);
$this
->
assertEquals
(
'cache'
,
$internalPath
);
\
OC_User
::
deleteUser
(
$userId
);
...
...
@@ -271,7 +271,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
\
OC\Files\Filesystem
::
getMountPoint
(
'/'
.
$userId
.
'/cache'
)
);
list
(
$storage
,
$internalPath
)
=
\
OC\Files\Filesystem
::
resolvePath
(
'/'
.
$userId
.
'/cache'
);
$this
->
assert
I
nstanceOf
(
'\OC\Files\Storage\Local'
,
$storage
);
$this
->
assert
True
(
$storage
->
i
nstanceOf
Storage
(
'\OC\Files\Storage\Local'
)
);
$this
->
assertEquals
(
''
,
$internalPath
);
\
OC_User
::
deleteUser
(
$userId
);
...
...
tests/lib/util.php
View file @
0e85618c
...
...
@@ -154,7 +154,7 @@ class Test_Util extends PHPUnit_Framework_TestCase {
$userMount
=
\
OC\Files\Filesystem
::
getMountManager
()
->
find
(
'/'
.
$user1
.
'/'
);
$this
->
assertNotNull
(
$userMount
);
$this
->
assert
I
nstanceOf
(
'\OC\Files\Storage\Wrapper\Quota'
,
$userMount
->
getStorage
(
));
$this
->
assert
True
(
$userMount
->
getStorage
()
->
i
nstanceOf
Storage
(
'\OC\Files\Storage\Wrapper\Quota'
));
// ensure that root wasn't wrapped
$rootMount
=
\
OC\Files\Filesystem
::
getMountManager
()
->
find
(
'/'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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