public function testTransliteration() {
$data = array(
'transliteration' => array(
'\$' => 'dollar',
'&' => 'and'
)
);
Catalog::write('runtime', 'inflection', 'en', $data);
Inflector::rules(
'transliteration', Catalog::read('runtime', 'inflection.transliteration', 'en')
);
$result = Inflector::slug('this & that');
$expected = 'this-and-that';
$this->assertEqual($expected, $result);
$data = array(
'transliteration' => array(
't' => 'd',
'&' => 'und'
)
);
Catalog::write('runtime', 'inflection', 'de', $data);
Inflector::rules(
'transliteration', Catalog::read('runtime', 'inflection.transliteration', 'de')
);
$result = Inflector::slug('this & that');
$expected = 'dhis-und-dhad';
$this->assertEqual($expected, $result);
}