public function testReader4()
 {
     if (!ezcBaseFeatures::classExists('SimpleXMLIterator')) {
         $this->markTestSkipped("This test is supposed to run only when the SimpleXML extension is available.");
     }
     $currentDir = dirname(__FILE__);
     $backend = new ezcTranslationTsBackend("{$currentDir}/files/translations");
     $backend->setOptions(array('format' => '[LOCALE].xml'));
     $backend->initReader('nb-no');
     $contexts = array();
     $backend->rewind();
     while ($backend->valid()) {
         $contextName = $backend->key();
         $contexts[] = $contextName;
         $backend->next();
     }
     $backend->deinitReader();
     $expected = array('contentstructuremenu/show_content_structure', 'design/admin/class/classlist', 'design/admin/class/datatype/browse_objectrelationlist_placement');
     self::assertEquals($expected, $contexts);
 }
Пример #2
0
 public function testReader4()
 {
     $currentDir = dirname(__FILE__);
     $backend = new ezcTranslationTsBackend("{$currentDir}/files/translations");
     $backend->setOptions(array('format' => '[LOCALE].xml'));
     $backend->initReader('nb-no');
     $contexts = array();
     $backend->rewind();
     while ($backend->valid()) {
         $contextName = $backend->key();
         $contexts[] = $contextName;
         $backend->next();
     }
     $backend->deinitReader();
     $expected = array('contentstructuremenu/show_content_structure', 'design/admin/class/classlist', 'design/admin/class/datatype/browse_objectrelationlist_placement');
     self::assertEquals($expected, $contexts);
 }