Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120822262
VcardAttachments.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
VcardAttachments.php
View Options
<?php
class
VcardAttachments_Plugin
extends
PHPUnit\Framework\TestCase
{
function
setUp
()
{
include_once
__DIR__
.
'/../vcard_attachments.php'
;
}
/**
* Plugin object construction test
*/
function
test_constructor
()
{
$rcube
=
rcube
::
get_instance
();
$plugin
=
new
vcard_attachments
(
$rcube
->
plugins
);
$this
->
assertInstanceOf
(
'vcard_attachments'
,
$plugin
);
$this
->
assertInstanceOf
(
'rcube_plugin'
,
$plugin
);
}
/**
* Test is_vcard()
*/
function
test_is_vcard
()
{
$rcube
=
rcube
::
get_instance
();
$plugin
=
new
vcard_attachments
(
$rcube
->
plugins
);
$part
=
new
rcube_message_part
();
$this
->
assertFalse
(
invokeMethod
(
$plugin
,
'is_vcard'
,
[
$part
]));
$part
->
mimetype
=
'text/vcard'
;
$this
->
assertTrue
(
invokeMethod
(
$plugin
,
'is_vcard'
,
[
$part
]));
$part
->
mimetype
=
'text/x-vcard'
;
$this
->
assertTrue
(
invokeMethod
(
$plugin
,
'is_vcard'
,
[
$part
]));
$part
->
mimetype
=
'text/directory'
;
$this
->
assertFalse
(
invokeMethod
(
$plugin
,
'is_vcard'
,
[
$part
]));
$part
->
ctype_parameters
[
'profile'
]
=
'vcard'
;
$this
->
assertTrue
(
invokeMethod
(
$plugin
,
'is_vcard'
,
[
$part
]));
$part
->
ctype_parameters
[
'profile'
]
=
'unknown'
;
$part
->
filename
=
'vcard.vcf'
;
$this
->
assertTrue
(
invokeMethod
(
$plugin
,
'is_vcard'
,
[
$part
]));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 9:47 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18841650
Default Alt Text
VcardAttachments.php (1 KB)
Attached To
Mode
R113 roundcubemail
Attached
Detach File
Event Timeline