Author: Derick Rethans
Date: 2006-01-25 20:15:06 +0100 (Wed, 25 Jan 2006)
New Revision: 2034

Log:
- Fixed test cases.

Modified:
   packages/Translation/trunk/tests/translation_filter_borkify_test.php
   packages/Translation/trunk/tests/translation_manager_test.php

Modified: packages/Translation/trunk/tests/translation_filter_borkify_test.php
===================================================================
--- packages/Translation/trunk/tests/translation_filter_borkify_test.php        
2006-01-25 19:11:57 UTC (rev 2033)
+++ packages/Translation/trunk/tests/translation_filter_borkify_test.php        
2006-01-25 19:15:06 UTC (rev 2034)
@@ -22,7 +22,7 @@
         $context[] = new ezcTranslationData( "Group list for '%1'", 
"Groeplijst voor %1", false, ezcTranslationData::TRANSLATED );
 
         $expected = array();
-        $expected[] = new ezcTranslationData( "Group list for '%1'", 
"[Groepleejst foor %1-a]", false, ezcTranslationData::TRANSLATED );
+        $expected[] = new ezcTranslationData( "Group list for '%1'", "[Groop 
leest for '%1'-a]", false, ezcTranslationData::TRANSLATED );
 
         $bork->runFilter( $context );
         self::assertEquals( $expected, $context );
@@ -106,7 +106,7 @@
         $context[] = new ezcTranslationData( "The %fruit is round.", "%Fruit 
er rund.", false, ezcTranslationData::TRANSLATED );
 
         $expected = array();
-        $expected[] = new ezcTranslationData( "The %fruit is round.", "[%Fruit 
er roond.]", false, ezcTranslationData::TRANSLATED );
+        $expected[] = new ezcTranslationData( "The %fruit is round.", "[The 
%fruit is roond.]", false, ezcTranslationData::TRANSLATED );
 
         $leet->runFilter( $context );
         self::assertEquals( $expected, $context );

Modified: packages/Translation/trunk/tests/translation_manager_test.php
===================================================================
--- packages/Translation/trunk/tests/translation_manager_test.php       
2006-01-25 19:11:57 UTC (rev 2033)
+++ packages/Translation/trunk/tests/translation_manager_test.php       
2006-01-25 19:15:06 UTC (rev 2034)
@@ -27,25 +27,6 @@
         self::assertEquals( $expected, $context );
     }
 
-    /**
-     * Tests if a cached context works.
-     * This one tests a cached context, the code is the same as the previous
-     * test, but works because that one is run first and thus the context is
-     * already cached.
-     */
-    public function testGetContextCached()
-    {
-        $currentDir = dirname( __FILE__ );
-        $backend = new ezcTranslationTsBackend( 
"{$currentDir}/files/translations" );
-        $backend->setOptions( array ( 'format' => '[LOCALE].xml' ) );
-
-        $trm = new ezcTranslationManager( $backend );
-        $context = $trm->getContext( 'nl-nl', 
'contentstructuremenu/show_content_structure' );
-
-        $expected = new ezcTranslation( array( new ezcTranslationData( 'Node 
ID: %node_id Visibility: %visibility', 'Knoop ID: %node_id Zichtbaar: 
%visibility', false, ezcTranslationData::TRANSLATED ) ) );
-        self::assertEquals( $expected, $context );
-    }
-
     public function testGetContextWithFilter()
     {
         $currentDir = dirname( __FILE__ );
@@ -73,18 +54,18 @@
         $backend = new ezcTranslationTsBackend( 
"{$currentDir}/files/translations" );
         $backend->setOptions( array ( 'format' => '[LOCALE].xml' ) );
 
+        $leet = ezcTranslationLeetFilter::getInstance();
         $fillin = ezcTranslationComplementEmptyFilter::getInstance();
-        $bork = ezcTranslationBorkFilter::getInstance();
         
         $trm = new ezcTranslationManager( $backend );
         $trm->addFilter( $fillin );
-        $trm->addFilter( $bork );
+        $trm->addFilter( $leet );
         $context = $trm->getContext( 'nl-nl', 
'design/admin/content/browse_bookmark' );
 
         $expected = array();
-        $expected[] = new ezcTranslationData( "Choose items to bookmark", 
"[Keees items oom toe te foegee eun uv feforeeetee]", false, 
ezcTranslationData::TRANSLATED );
-        $expected[] = new ezcTranslationData( "Select the items that you want 
to bookmark using the checkboxes and click \"OK\".", "[Select the items thet 
yoo vunt to bookmerk useeng the checkboxes und cleeck \"OK\".]", false, 
ezcTranslationData::UNFINISHED );
-        $expected[] = new ezcTranslationData( "Navigate using the available 
tabs (above), the tree menu (left) and the content list (middle).", "[Nefeegete 
useeng the efeeeleble tebs (ebofe), the tree menoo (lefft) und the content 
leest (meeddle).]", false, ezcTranslationData::UNFINISHED );
+        $expected[] = new ezcTranslationData( "Choose items to bookmark", 
"Ki3s i73ms 0m 23 73 v03g3n 44n uw f4v0ri373n", false, 
ezcTranslationData::TRANSLATED );
+        $expected[] = new ezcTranslationData( "Select the items that you want 
to bookmark using the checkboxes and click \"OK\".", "S313c7 7h3 i73ms 7h47 u 
w4n7 2 b00km4rk using 7h3 ch3ckb0x3s 4nd c1ick \"0K\".", false, 
ezcTranslationData::UNFINISHED );
+        $expected[] = new ezcTranslationData( "Navigate using the available 
tabs (above), the tree menu (left) and the content list (middle).", "N4vig8 
using 7h3 4v4i14b13 74bs (4b0v3), 7h3 7r33 m3nu (13f7) 4nd 7h3 c0n73n7 1is7 
(midd13).", false, ezcTranslationData::UNFINISHED );
         $expected = new ezcTranslation( $expected );
 
         self::assertEquals( $expected, $context );

-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to