Changeset 1170 in tests for trunk/tests/pomo/test_mo.php
- Timestamp:
- 12/19/2012 12:56:28 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/pomo/test_mo.php
r1106 r1170 5 5 function test_mo_simple() { 6 6 $mo = new MO(); 7 $mo->import_from_file( 'data/pomo/simple.mo');7 $mo->import_from_file(DIR_TESTDATA . '/pomo/simple.mo'); 8 8 $this->assertEquals(array('Project-Id-Version' => 'WordPress 2.6-bleeding', 'Report-Msgid-Bugs-To' => 'wp-polyglots@lists.automattic.com'), $mo->headers); 9 9 $this->assertEquals(2, count($mo->entries)); … … 14 14 function test_mo_plural() { 15 15 $mo = new MO(); 16 $mo->import_from_file( 'data/pomo/plural.mo');16 $mo->import_from_file(DIR_TESTDATA . '/pomo/plural.mo'); 17 17 $this->assertEquals(1, count($mo->entries)); 18 18 $this->assertEquals(array("oney dragoney", "twoey dragoney", "manyey dragoney", "manyeyey dragoney", "manyeyeyey dragoney"), $mo->entries["one dragon"]->translations); … … 41 41 function test_mo_context() { 42 42 $mo = new MO(); 43 $mo->import_from_file( 'data/pomo/context.mo');43 $mo->import_from_file(DIR_TESTDATA . '/pomo/context.mo'); 44 44 $this->assertEquals(2, count($mo->entries)); 45 45 $plural_entry = new Translation_Entry(array('singular' => 'one dragon', 'plural' => '%d dragons', 'translations' => array("oney dragoney", "twoey dragoney","manyey dragoney"), 'context' => 'dragonland')); … … 114 114 function test_nplurals_with_backslashn() { 115 115 $mo = new MO(); 116 $mo->import_from_file( 'data/pomo/bad_nplurals.mo');116 $mo->import_from_file(DIR_TESTDATA . '/pomo/bad_nplurals.mo'); 117 117 $this->assertEquals('%d foro', $mo->translate_plural('%d forum', '%d forums', 1)); 118 118 $this->assertEquals('%d foros', $mo->translate_plural('%d forum', '%d forums', 2)); … … 123 123 $start = microtime(true); 124 124 $mo = new MO(); 125 $mo->import_from_file( 'data/pomo/de_DE-2.8.mo');125 $mo->import_from_file(DIR_TESTDATA . '/pomo/de_DE-2.8.mo'); 126 126 // echo "\nPerformance: ".(microtime(true) - $start)."\n"; 127 127 } … … 132 132 if ((ini_get("mbstring.func_overload") & 2) != 0) { 133 133 $mo = new MO(); 134 $mo->import_from_file( 'data/pomo/overload.mo');134 $mo->import_from_file(DIR_TESTDATA . '/pomo/overload.mo'); 135 135 $this->assertEquals(array('Табло'), $mo->entries['Dashboard']->translations); 136 136 } … … 139 139 function test_load_pot_file() { 140 140 $mo = new MO(); 141 $this->assertEquals( false, $mo->import_from_file( 'data/pomo/mo.pot') );141 $this->assertEquals( false, $mo->import_from_file(DIR_TESTDATA . '/pomo/mo.pot') ); 142 142 } 143 143 }
Note: See TracChangeset
for help on using the changeset viewer.