summaryrefslogtreecommitdiff
path: root/ext/mailparse/tests/002.phpt
blob: 81f74052607093b83914e213815ff8fb045e49a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Check stream encoding
--SKIPIF--
<?php if (!extension_loaded("mailparse")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?php 
$text = <<<EOD
hello, this is some text=hello.
EOD;
$fp = tmpfile();
fwrite($fp, $text);
rewind($fp);
$dest = tmpfile();
mailparse_stream_encode($fp, $dest, "quoted-printable");
rewind($dest);
$data = fread($dest, 2048);
echo $data;
?>
--EXPECT--
hello, this is some text=3Dhello.