mirror of
https://github.com/php/pecl-mail-mailparse.git
synced 2026-03-23 22:52:14 +01:00
fix test, 1 more test case + ensure order
This commit is contained in:
@@ -8,14 +8,20 @@ if (!extension_loaded("mailparse")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . "/testdata"));
|
||||
$names = array();
|
||||
foreach ($files as $file) {
|
||||
if (strrpos($file, '.txt') !== false) {
|
||||
var_dump(mailparse_determine_best_xfer_encoding(fopen($file->getRealPath(), 'r')));
|
||||
if (strrpos($file->getFileName(), '.txt') !== false) {
|
||||
$names[] = $file->getRealPath();
|
||||
}
|
||||
}
|
||||
sort($names);
|
||||
foreach ($names as $name) {
|
||||
var_dump(mailparse_determine_best_xfer_encoding(fopen($name, 'r')));
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
string(4) "7bit"
|
||||
string(4) "7bit"
|
||||
string(6) "BASE64"
|
||||
string(4) "7bit"
|
||||
string(4) "7bit"
|
||||
|
||||
Reference in New Issue
Block a user