Esempio n. 1
0
 /**
  * @requires extension mbstring
  */
 public function testShortenedExportForMultibyteCharacters()
 {
     $oldMbLanguage = mb_language();
     mb_language('Japanese');
     $oldMbInternalEncoding = mb_internal_encoding();
     mb_internal_encoding('UTF-8');
     try {
         $this->assertSame("'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくや...しゑひもせす'", $this->trimNewline($this->exporter->shortenedExport('いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす')));
     } catch (\Exception $e) {
         mb_internal_encoding($oldMbInternalEncoding);
         mb_language($oldMbLanguage);
         throw $e;
     }
     mb_internal_encoding($oldMbInternalEncoding);
     mb_language($oldMbLanguage);
 }
Esempio n. 2
0
 /**
  * @dataProvider shortenedExportProvider
  */
 public function testShortenedExport($value, $expected)
 {
     $this->assertSame($expected, $this->trimNewline($this->exporter->shortenedExport($value)));
 }