Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120825041
MimeDecode.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
MimeDecode.php
View Options
<?php
/**
* Test class to test rcube_mime_decode class
*
* @package Tests
*/
class
Framework_MimeDecode
extends
PHPUnit\Framework\TestCase
{
/**
* Test mail decode
*/
function
test_decode
()
{
$mail
=
file_get_contents
(
TESTS_DIR
.
'src/mail0.eml'
);
$decoder
=
new
rcube_mime_decode
();
$result
=
$decoder
->
decode
(
$mail
);
$this
->
assertInstanceOf
(
'rcube_message_part'
,
$result
);
$this
->
assertSame
(
'multipart/mixed'
,
$result
->
mimetype
);
$this
->
assertSame
(
'=_8853bfb47b7da1852ac882e69cc724f3'
,
$result
->
ctype_parameters
[
'boundary'
]);
$this
->
assertSame
(
'8bit'
,
$result
->
encoding
);
$this
->
assertSame
(
1384
,
$result
->
size
);
$this
->
assertCount
(
13
,
$result
->
headers
);
$this
->
assertSame
(
'thomas@roundcube.net'
,
$result
->
headers
[
'x-sender'
]);
$this
->
assertCount
(
3
,
$result
->
parts
);
$this
->
assertSame
(
11
,
$result
->
parts
[
2
]->
size
);
$this
->
assertSame
(
'text/plain'
,
$result
->
parts
[
2
]->
mimetype
);
$this
->
assertSame
(
'lines_lf.txt'
,
$result
->
parts
[
2
]->
filename
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 10:32 AM (1 d, 22 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
82/10/0fe22a942301c0364458b019ba14
Default Alt Text
MimeDecode.php (1 KB)
Attached To
Mode
R113 roundcubemail
Attached
Detach File
Event Timeline