Index: tests/pomo/test_mo.php
===================================================================
--- tests/pomo/test_mo.php	(revision 1169)
+++ tests/pomo/test_mo.php	(working copy)
@@ -4,35 +4,47 @@
 
 	function test_mo_simple() {
 		$mo = new MO();
-		$mo->import_from_file('data/pomo/simple.mo');
-		$this->assertEquals(array('Project-Id-Version' => 'WordPress 2.6-bleeding', 'Report-Msgid-Bugs-To' => 'wp-polyglots@lists.automattic.com'), $mo->headers);
-		$this->assertEquals(2, count($mo->entries));
-		$this->assertEquals(array('dyado'), $mo->entries['baba']->translations);
-		$this->assertEquals(array('yes'), $mo->entries["kuku\nruku"]->translations);
+		$mo->import_from_file( DIR_TESTDATA . '/pomo/simple.mo' );
+		$this->assertEquals( array(
+					   'Project-Id-Version' => 'WordPress 2.6-bleeding',
+					   'Report-Msgid-Bugs-To' => 'wp-polyglots@lists.automattic.com' ),
+				    $mo->headers
+				    );
+		$this->assertEquals( 2, count( $mo->entries ) );
+		$this->assertEquals( array( 'dyado' ), $mo->entries['baba']->translations );
+		$this->assertEquals( array( 'yes' ), $mo->entries["kuku\nruku"]->translations );
 	}
 
 	function test_mo_plural() {
 		$mo = new MO();
-		$mo->import_from_file('data/pomo/plural.mo');
-		$this->assertEquals(1, count($mo->entries));
-		$this->assertEquals(array("oney dragoney", "twoey dragoney", "manyey dragoney", "manyeyey dragoney", "manyeyeyey dragoney"), $mo->entries["one dragon"]->translations);
+		$mo->import_from_file( DIR_TESTDATA . '/pomo/plural.mo' );
+		$this->assertEquals( 1, count( $mo->entries ) );
+		$this->assertEquals( array(
+					   "oney dragoney",
+					   "twoey dragoney",
+					   "manyey dragoney",
+					   "manyeyey dragoney",
+					   "manyeyeyey dragoney"
+					   ),
+				    $mo->entries["one dragon"]->translations
+				    );
 
-		$this->assertEquals('oney dragoney', $mo->translate_plural('one dragon', '%d dragons', 1));
-		$this->assertEquals('twoey dragoney', $mo->translate_plural('one dragon', '%d dragons', 2));
-		$this->assertEquals('twoey dragoney', $mo->translate_plural('one dragon', '%d dragons', -8));
+		$this->assertEquals( 'oney dragoney', $mo->translate_plural( 'one dragon', '%d dragons', 1 ) );
+		$this->assertEquals( 'twoey dragoney', $mo->translate_plural( 'one dragon', '%d dragons', 2 ) );
+		$this->assertEquals( 'twoey dragoney', $mo->translate_plural( 'one dragon', '%d dragons', -8 ) );
 
 
-		$mo->set_header('Plural-Forms', 'nplurals=5; plural=0');
+		$mo->set_header( 'Plural-Forms', 'nplurals=5; plural=0' );
 		$this->assertEquals('oney dragoney', $mo->translate_plural('one dragon', '%d dragons', 1));
 		$this->assertEquals('oney dragoney', $mo->translate_plural('one dragon', '%d dragons', 2));
 		$this->assertEquals('oney dragoney', $mo->translate_plural('one dragon', '%d dragons', -8));
 
-		$mo->set_header('Plural-Forms', 'nplurals=5; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;');
+		$mo->set_header( 'Plural-Forms', 'nplurals=5; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;' );
 		$this->assertEquals('oney dragoney', $mo->translate_plural('one dragon', '%d dragons', 1));
 		$this->assertEquals('manyey dragoney', $mo->translate_plural('one dragon', '%d dragons', 11));
 		$this->assertEquals('twoey dragoney', $mo->translate_plural('one dragon', '%d dragons', 3));
 
-		$mo->set_header('Plural-Forms', 'nplurals=2; plural=n !=1;');
+		$mo->set_header( 'Plural-Forms', 'nplurals=2; plural=n !=1;' );
 		$this->assertEquals('oney dragoney', $mo->translate_plural('one dragon', '%d dragons', 1));
 		$this->assertEquals('twoey dragoney', $mo->translate_plural('one dragon', '%d dragons', 2));
 		$this->assertEquals('twoey dragoney', $mo->translate_plural('one dragon', '%d dragons', -8));
@@ -40,7 +52,7 @@
 
 	function test_mo_context() {
 		$mo = new MO();
-		$mo->import_from_file('data/pomo/context.mo');
+		$mo->import_from_file( DIR_TESTDATA . '/pomo/context.mo' );
 		$this->assertEquals(2, count($mo->entries));
 		$plural_entry = new Translation_Entry(array('singular' => 'one dragon', 'plural' => '%d dragons', 'translations' => array("oney dragoney", "twoey dragoney","manyey dragoney"), 'context' => 'dragonland'));
 		$this->assertEquals($plural_entry, $mo->entries[$plural_entry->key()]);
@@ -54,46 +66,57 @@
 
 	function test_translations_merge() {
 		$host = new Translations();
-		$host->add_entry(new Translation_Entry(array('singular' => 'pink',)));
-		$host->add_entry(new Translation_Entry(array('singular' => 'green',)));
+		$host->add_entry( new Translation_Entry( array( 'singular' => 'pink', ) ) );
+		$host->add_entry( new Translation_Entry( array( 'singular' => 'green', ) ) );
 		$guest = new Translations();
-		$guest->add_entry(new Translation_Entry(array('singular' => 'green',)));
-		$guest->add_entry(new Translation_Entry(array('singular' => 'red',)));
-		$host->merge_with($guest);
-		$this->assertEquals(3, count($host->entries));
-		$this->assertEquals(array(), array_diff(array('pink', 'green', 'red'), array_keys($host->entries)));
+		$guest->add_entry( new Translation_Entry( array( 'singular' => 'green', ) ) );
+		$guest->add_entry( new Translation_Entry( array( 'singular' => 'red', ) ) );
+		$host->merge_with( $guest );
+		$this->assertEquals( 3, count( $host->entries ) );
+		$this->assertEquals(
+				    array(),
+				    array_diff(
+					       array( 'pink', 'green', 'red' ),
+					       array_keys($host->entries)
+					       )
+				    );
 	}
 
 	function test_export_mo_file() {
 		$entries = array();
-		$entries[] = new Translation_Entry(array('singular' => 'pink',
-			'translations' => array('розов')));
-		$no_translation_entry = new Translation_Entry(array('singular' => 'grey'));
-		$entries[] = new Translation_Entry(array('singular' => 'green', 'plural' => 'greens',
-			'translations' => array('зелен', 'зелени')));
-		$entries[] = new Translation_Entry(array('singular' => 'red', 'context' => 'color',
-			'translations' => array('червен')));
-		$entries[] = new Translation_Entry(array('singular' => 'red', 'context' => 'bull',
-			'translations' => array('бик')));
-		$entries[] = new Translation_Entry(array('singular' => 'maroon', 'plural' => 'maroons', 'context' => 'context',
-			'translations' => array('пурпурен', 'пурпурни')));
+		$entries[] = new Translation_Entry( array(
+			'singular' => 'pink',
+			'translations' => array('розов') ) );
+		$no_translation_entry = new Translation_Entry( array( 'singular' => 'grey' ));
+		$entries[] = new Translation_Entry( array(
+			'singular' => 'green', 'plural' => 'greens',
+			'translations' => array('зелен', 'зелени') ) );
+		$entries[] = new Translation_Entry( array(
+			'singular' => 'red', 'context' => 'color',
+			'translations' => array('червен') ) );
+		$entries[] = new Translation_Entry( array(
+			'singular' => 'red', 'context' => 'bull',
+			'translations' => array('бик') ) );
+		$entries[] = new Translation_Entry( array(
+			'singular' => 'maroon', 'plural' => 'maroons', 'context' => 'context',
+			'translations' => array( 'пурпурен', 'пурпурни' ) ) );
 
 		$mo = new MO();
-		$mo->set_header('Project-Id-Version', 'Baba Project 1.0');
-		foreach($entries as $entry) {
-			$mo->add_entry($entry);
+		$mo->set_header( 'Project-Id-Version', 'Baba Project 1.0' );
+		foreach( $entries as $entry ) {
+			$mo->add_entry( $entry );
 		}
-		$mo->add_entry($no_translation_entry);
+		$mo->add_entry( $no_translation_entry );
 
 		$temp_fn = $this->temp_filename();
-		$mo->export_to_file($temp_fn);
+		$mo->export_to_file( $temp_fn );
 
 		$again = new MO();
-		$again->import_from_file($temp_fn);
+		$again->import_from_file( $temp_fn );
 
-		$this->assertEquals(count($entries), count($again->entries));
-		foreach($entries as $entry) {
-			$this->assertEquals($entry, $again->entries[$entry->key()]);
+		$this->assertEquals( count( $entries ), count( $again->entries ) );
+		foreach( $entries as $entry ) {
+			$this->assertEquals( $entry, $again->entries[$entry->key()] );
 		}
 	}
 
@@ -106,38 +129,38 @@
 		$mo->export_to_file( $temp_fn );
 
 		$again = new MO();
-		$again->import_from_file($temp_fn);
+		$again->import_from_file( $temp_fn );
 
 		$this->assertEquals( 0, count( $again->entries ) );
 	}
 
 	function test_nplurals_with_backslashn() {
 		$mo = new MO();
-		$mo->import_from_file('data/pomo/bad_nplurals.mo');
-		$this->assertEquals('%d foro', $mo->translate_plural('%d forum', '%d forums', 1));
-		$this->assertEquals('%d foros', $mo->translate_plural('%d forum', '%d forums', 2));
-		$this->assertEquals('%d foros', $mo->translate_plural('%d forum', '%d forums', -1));
+		$mo->import_from_file( DIR_TESTDATA . '/pomo/bad_nplurals.mo' );
+		$this->assertEquals( '%d foro', $mo->translate_plural( '%d forum', '%d forums', 1 ) );
+		$this->assertEquals( '%d foros', $mo->translate_plural( '%d forum', '%d forums', 2 ) );
+		$this->assertEquals( '%d foros', $mo->translate_plural( '%d forum', '%d forums', -1 ) );
 	}
 
 	function disabled_test_performance() {
-		$start = microtime(true);
+		$start = microtime( true );
 		$mo = new MO();
-		$mo->import_from_file('data/pomo/de_DE-2.8.mo');
+		$mo->import_from_file( DIR_TESTDATA . '/pomo/de_DE-2.8.mo' );
 		// echo "\nPerformance: ".(microtime(true) - $start)."\n";
 	}
 
 	function test_overloaded_mb_functions() {
 		// skipIf() method skips the whole test case, not only this method
 		// that's why we are skipping it the stupid way
-		if ((ini_get("mbstring.func_overload") & 2) != 0) {
+		if ( ( ini_get( "mbstring.func_overload" ) & 2 ) != 0 ) {
 			$mo = new MO();
-			$mo->import_from_file('data/pomo/overload.mo');
-			$this->assertEquals(array('Табло'), $mo->entries['Dashboard']->translations);
+			$mo->import_from_file( DIR_TESTDATA . '/pomo/overload.mo' );
+			$this->assertEquals( array( 'Табло' ), $mo->entries['Dashboard']->translations );
 		}
 	}
 
 	function test_load_pot_file() {
 		$mo = new MO();
-		$this->assertEquals( false, $mo->import_from_file('data/pomo/mo.pot') );
+		$this->assertEquals( false, $mo->import_from_file( DIR_TESTDATA . '/pomo/mo.pot' ) );
 	}
 }
Index: tests/pomo/test_po.php
===================================================================
--- tests/pomo/test_po.php	(revision 1169)
+++ tests/pomo/test_po.php	(working copy)
@@ -174,7 +174,7 @@
 
 	function test_import_from_file() {
 		$po = new PO();
-		$res = $po->import_from_file('data/pomo/simple.po');
+		$res = $po->import_from_file( DIR_TESTDATA . '/pomo/simple.po' );
 		$this->assertEquals(true, $res);
 
 		$this->assertEquals(array('Project-Id-Version' => 'WordPress 2.6-bleeding', 'Plural-Forms' => 'nplurals=2; plural=n != 1;'), $po->headers);
@@ -204,15 +204,14 @@
 
 	function test_import_from_entry_file_should_give_false() {
 		$po = new PO();
-		$this->assertFalse( $po->import_from_file( 'data/pomo/empty.po' ) );
+		$this->assertFalse( $po->import_from_file( DIR_TESTDATA . '/pomo/empty.po' ) );
 	}
 
 	function test_import_from_file_with_windows_line_endings_should_work_as_with_unix_line_endings() {
 		$po = new PO();
-		$this->assertTrue( $po->import_from_file( 'data/pomo/windows-line-endings.po' ) );
+		$this->assertTrue( $po->import_from_file( DIR_TESTDATA . '/pomo/windows-line-endings.po' ) );
 		$this->assertEquals( 1, count( $po->entries ) );
 	}
 
 	//TODO: add tests for bad files
 }
-?>
