Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1821504
CollectionTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
1 KB
Subscribers
None
CollectionTest.php
View Options
<?php
namespace
Sabre\DAVACL\FS
;
class
CollectionTest
extends
FileTest
{
function
setUp
()
{
$this
->
path
=
SABRE_TEMPDIR
;
$this
->
sut
=
new
Collection
(
$this
->
path
,
$this
->
acl
,
$this
->
owner
);
}
function
tearDown
()
{
\Sabre\TestUtil
::
clearTempDir
();
}
function
testGetChildFile
()
{
file_put_contents
(
SABRE_TEMPDIR
.
'/file.txt'
,
'hello'
);
$child
=
$this
->
sut
->
getChild
(
'file.txt'
);
$this
->
assertInstanceOf
(
'Sabre
\\
DAVACL
\\
FS
\\
File'
,
$child
);
$this
->
assertEquals
(
'file.txt'
,
$child
->
getName
());
$this
->
assertEquals
(
$this
->
acl
,
$child
->
getACL
());
$this
->
assertEquals
(
$this
->
owner
,
$child
->
getOwner
());
}
function
testGetChildDirectory
()
{
mkdir
(
SABRE_TEMPDIR
.
'/dir'
);
$child
=
$this
->
sut
->
getChild
(
'dir'
);
$this
->
assertInstanceOf
(
'Sabre
\\
DAVACL
\\
FS
\\
Collection'
,
$child
);
$this
->
assertEquals
(
'dir'
,
$child
->
getName
());
$this
->
assertEquals
(
$this
->
acl
,
$child
->
getACL
());
$this
->
assertEquals
(
$this
->
owner
,
$child
->
getOwner
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Dec 24, 12:41 AM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914304
Default Alt Text
CollectionTest.php (1 KB)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment