=0D=0A"]], ["8.eml", 2, ["Hello,\r\n\r\nYou have received a newsletter from Chemol Travel.", ""]], ]; } /** * @dataProvider providerTestParseMessage */ public function test_parse_message($input, $expected_part_count, $expected_body) { $message = file_get_contents(TEST_FILES_DIR . $input); Piler_Mime_Decode::ParseMessage($message, $parts); $this->assertEquals(count($parts), $expected_part_count); for($i=0; $iassertEquals($expected_body[$i], substr($parts[$i]['body'], 0, strlen($expected_body[$i]))); } } }