diff --git a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php index 71eaf0dfe..dddd80f82 100644 --- a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php +++ b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php @@ -273,6 +273,24 @@ class CakeEmailTest extends CakeTestCase { $result = $this->CakeEmail->formatAddress(array('cake@cakephp.org' => 'ÄÖÜTest')); $expected = array('=?UTF-8?B?w4TDlsOcVGVzdA==?= '); $this->assertIdentical($expected, $result); + + $result = $this->CakeEmail->formatAddress(array('cake@cakephp.org' => '日本語Test')); + $expected = array('=?UTF-8?B?5pel5pys6KqeVGVzdA==?= '); + $this->assertIdentical($expected, $result); + } + +/** + * testFormatAddressJapanese + * + * @return void + */ + public function testFormatAddressJapanese() { + $this->skipIf(!function_exists('mb_convert_encoding')); + + $this->CakeEmail->charset = 'ISO-2022-JP'; + $result = $this->CakeEmail->formatAddress(array('cake@cakephp.org' => '日本語Test')); + $expected = array('=?ISO-2022-JP?B?GyRCRnxLXDhsGyhCVGVzdA==?= '); + $this->assertIdentical($expected, $result); } /**