]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blob - vendor/pear/mail_mime/tests/test_Bug_14529.phpt
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / vendor / pear / mail_mime / tests / test_Bug_14529.phpt
1 --TEST--
2 Bug #14529  basename() workaround
3 --SKIPIF--
4 --FILE--
5 <?php
6 include "Mail/mime.php";
7
8 $Mime = new Mail_mime();
9 // some text with polish Unicode letter at the beginning
10 $filename = base64_decode("xZtjaWVtYQ==");
11 $Mime->addAttachment('testfile', "text/plain", $filename, FALSE, 'base64', 'attachment', 'ISO-8859-1');
12
13 $content = $Mime->get();
14 $content = str_replace("\n", '', $content);
15
16 if (preg_match('/filename([^\s]+)/i', $content, $matches)) {
17     echo $matches[1];
18 }
19 ?>
20 --EXPECT--
21 *=ISO-8859-1''%C5%9Bciema;