示例#1
0
function sound()
{
    $sound = new IndicSoundex();
    echo $sound->soundex('ಬೆಂಗಳೂರು') . PHP_EOL;
    echo $sound->soundex('आम्र् फल्') . PHP_EOL;
    echo $sound->soundex('vasudev') . PHP_EOL;
    echo $sound->soundex('Rupert्') . PHP_EOL;
}
 /**
  * String Soundex generation test
  * @param $word
  * @param $expected
  * @dataProvider soundexProvider
  */
 public function testSoundex($word, $expected)
 {
     $soundex = new IndicSoundex();
     $this->assertEquals($expected, $soundex->soundex($word));
 }