public function testMixedWithSpaces() { $source = ' THL 台灣華語 THL 羅馬拼音 THL '; $expect = ' THL ㄊㄞˊ ㄨㄢ ㄏㄨㄚˊ ㄩˇ THL ㄌㄨㄛˊ ㄇㄚˇ ㄆㄧㄣ ㄧㄣ THL '; $output = Pinyin::bpmf($source); $this->assertSame($expect, $output); $source = ' THL 台灣華語 THL 羅馬拼音 THL '; $expect = ' THL ㄊㄞˊ ㄨㄢ ㄏㄨㄚˊ ㄩˇ THL ㄌㄨㄛˊ ㄇㄚˇ ㄆㄧㄣ ㄧㄣ THL '; $output = Pinyin::bpmf($source); $this->assertSame($expect, $output); }