File: 011.phpt

package info (click to toggle)
php-mailparse 3.0.2%2B2.1.6-12-gae1ef14-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,524 kB
  • ctags: 529
  • sloc: ansic: 3,936; xml: 203; php: 38; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 565 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Check mailparse_determine_best_xfer_encoding
--SKIPIF--
<?php
/* vim600: sw=4 ts=4 fdm=marker syn=php
*/
if (!extension_loaded("mailparse")) print "skip"; ?>
--FILE--
<?php
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . "/testdata"));
foreach ($files as $file) {
	if (strrpos($file, '.txt') !== false) {
		var_dump(mailparse_determine_best_xfer_encoding(fopen($file->getRealPath(), 'r')));
	}
}
?>
--EXPECT--
string(4) "7bit"
string(6) "BASE64"
string(4) "7bit"
string(4) "7bit"
string(4) "7bit"
string(4) "7bit"