[icinga-checkins] icinga.org: icingaweb2/feature/po-file-parser-13011: CatalogParserTest: Update tests to fit new CatalogParser

git at icinga.org git at icinga.org
Fri Nov 11 12:05:32 CET 2016


Module: icingaweb2
Branch: feature/po-file-parser-13011
Commit: d7d98e51a2c24f43188aa410424bd14b6fd6984e
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=d7d98e51a2c24f43188aa410424bd14b6fd6984e

Author: Jennifer Mourek <jennifer.mourek at netways.de>
Date:   Fri Nov 11 12:04:47 2016 +0100

CatalogParserTest: Update tests to fit new CatalogParser

---

 .../Translation/Catalog/CatalogParserTest.php        |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/translation/test/php/library/Translation/Catalog/CatalogParserTest.php b/modules/translation/test/php/library/Translation/Catalog/CatalogParserTest.php
index af94fb4..b92c161 100644
--- a/modules/translation/test/php/library/Translation/Catalog/CatalogParserTest.php
+++ b/modules/translation/test/php/library/Translation/Catalog/CatalogParserTest.php
@@ -94,7 +94,7 @@ class CatalogParserTest extends BaseTestCase
 
         $this->assertEquals(
             'translation',
-            $parserResult[0]['msgstr'],
+            $parserResult[0]['msgstr'][0],
             'CatalogParser::parsePath does not parse msgstr correctly'
         );
     }
@@ -106,7 +106,7 @@ class CatalogParserTest extends BaseTestCase
 
         $this->assertEquals(
             'translation',
-            $parserResult[0]['msgstr'],
+            $parserResult[0]['msgstr'][0],
             'CatalogParser::parsePath does not parse obsolete_msgstr correctly'
         );
     }
@@ -154,7 +154,7 @@ class CatalogParserTest extends BaseTestCase
 
         $this->assertEquals(
             'translation',
-            $parserResult[0]['msgstr_plural'][0],
+            $parserResult[0]['msgstr'][0],
             'CatalogParser::parsePath does not parse msgstr_plural[0] correctly'
         );
     }
@@ -166,7 +166,7 @@ class CatalogParserTest extends BaseTestCase
 
         $this->assertEquals(
             'translation',
-            $parserResult[0]['msgstr_plural'][0],
+            $parserResult[0]['msgstr'][0],
             'CatalogParser::parsePath does not parse obsolete_msgstr_plural[0] correctly'
         );
     }
@@ -178,7 +178,7 @@ class CatalogParserTest extends BaseTestCase
 
         $this->assertEquals(
             'this is a translator comment',
-            $parserResult[0]['translator_comment'][0],
+            $parserResult[0]['translator_comments'][0],
             'CatalogParser::parsePath does not parse translator_comment correctly'
         );
     }
@@ -190,7 +190,7 @@ class CatalogParserTest extends BaseTestCase
 
         $this->assertEquals(
             'this a an extracted comment',
-            $parserResult[0]['extracted_comment'][0],
+            $parserResult[0]['extracted_comments'][0],
             'CatalogParser::parsePath does not parse extracted_comment correctly'
         );
     }
@@ -202,7 +202,7 @@ class CatalogParserTest extends BaseTestCase
 
         $this->assertEquals(
             '/this/is/a/test/path:999',
-            $parserResult[0]['path'][0],
+            $parserResult[0]['paths'][0],
             'CatalogParser::parsePath does not parse paths correctly'
         );
     }
@@ -214,7 +214,7 @@ class CatalogParserTest extends BaseTestCase
 
         $this->assertEquals(
             'this-is-a-flag',
-            $parserResult[0]['flag'][0],
+            $parserResult[0]['flags'][0],
             'CatalogParser::parsePath does not parse flags correctly'
         );
     }
@@ -223,6 +223,6 @@ class CatalogParserTest extends BaseTestCase
     {
         $parserResult = CatalogParser::parsePath('/vagrant/modules/translation/test/php/library/Translation/Catalog/test.po');
 
-        var_dump($parserResult);
+        //var_dump($parserResult);
     }
 }
\ No newline at end of file



More information about the icinga-checkins mailing list