The format of the parameters should be as follows:
$lang = array(
'src' => 'en',
'output' => 'de',
'name' => 'German',
'native' => 'Deutsch'
);
$locales = array(
array(
'region' => 'DE',
'name' => 'Germany',
'native' => 'Deutschland',
'text' => array(
array(
'source' => 'This field is required.',
'output' => 'Dieses Feld ist erforderlich.'
), ...
)
), ...
);
public function testCreateXmlFileNoSourceException() { $this->setExpectedException('Pop\\I18n\\Exception'); $lang = array('src' => 'en', 'output' => 'de', 'name' => 'German', 'native' => 'Deutsch'); $locales = array(array('region' => 'DE', 'name' => 'Germany', 'native' => 'Deutschland', 'text' => array(array()))); I18n::createXmlFile($lang, $locales, __DIR__ . '/../tmp/new_de.xml'); }