Example #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 comparison test
  * @param $word1
  * @param $word2
  * @param $expected
  * @dataProvider compareProvider
  */
 public function testCompare($word1, $word2, $expected)
 {
     $soundex = new IndicSoundex();
     $this->assertEquals($expected, $soundex->compare($word1, $word2));
 }