fix test, 1 more test case + ensure order

This commit is contained in:
Remi Collet
2018-07-10 14:46:56 +02:00
parent bddcfcb2d3
commit 26b4947805

View File

@@ -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"