[icinga-checkins] icinga.org: icingaweb2/feature/translation-catalog-object-13012: CatalogParserTest: Update tests

git at icinga.org git at icinga.org
Wed Nov 23 15:44:18 CET 2016


Module: icingaweb2
Branch: feature/translation-catalog-object-13012
Commit: 62cc78c1f8e0ef2f73f7acdec72866e6bac2dbf7
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=62cc78c1f8e0ef2f73f7acdec72866e6bac2dbf7

Author: Jennifer Mourek <jennifer.mourek at netways.de>
Date:   Wed Nov 23 15:39:56 2016 +0100

CatalogParserTest: Update tests

---

 .../Translation/Catalog/CatalogParserTest.php      |   78 ++++++--------------
 1 file changed, 23 insertions(+), 55 deletions(-)

diff --git a/modules/translation/test/php/library/Translation/Catalog/CatalogParserTest.php b/modules/translation/test/php/library/Translation/Catalog/CatalogParserTest.php
index 03ed1b1..f60d6cc 100644
--- a/modules/translation/test/php/library/Translation/Catalog/CatalogParserTest.php
+++ b/modules/translation/test/php/library/Translation/Catalog/CatalogParserTest.php
@@ -422,37 +422,6 @@ EOT
         $this->fail('CatalogParser does not throw an exception if char after hash is wrong');
     }
 
-
-    /**
-     * @depends testWhetherAMessageContextIsParsedCorrectly
-     * @depends testWhetherAnObsoleteMessageContextIsParsedCorrectly
-     * @depends testWhetherAPreviousMessageContextIsParsedCorrectly
-     * @depends testWhetherAMessageIdIsParsedCorrectly
-     * @depends testWhetherAnObsoleteMessageIdIsParsedCorrectly
-     * @depends testWhetherAPreviousMessageIdIsParsedCorrectly
-     * @depends testWhetherAMessageStringIsParsedCorrectly
-     * @depends testWhetherAnObsoleteMessageStringIsParsedCorrectly
-     * @depends testWhetherAPluralMessageIdIsParsedCorrectly
-     * @depends testWhetherAnObsoletePluralMessageIdIsParsedCorrectly
-     * @depends testWhetherAPreviousPluralMessageIdIsParsedCorrectly
-     * @depends testWhetherAPluralMessageStringIsParsedCorrectly
-     * @depends testWhetherAnObsoletePluralMessageStringIsParsedCorrectly
-     * @depends testWhetherAnObsoleteEntryIsCorrectlyIdentified
-     * @depends testWhetherATranslatorCommentIsParsedCorrectly
-     * @depends testWhetherAExtractedCommentIsParsedCorrectly
-     * @depends testWhetherASinglePathIsParsedCorrectly
-     * @depends testWhetherMultiplePathsAreParsedCorrectly
-     * @depends testWhetherASingleFlagIsParsedCorrectly
-     * @depends testWhetherMultipleFlagsAreParsedCorrectly
-     * @depends testWhetherEscapedCharactersAreProperlyResolved
-     * @depends testWhetherMissingKeywordsCauseAnError
-     * @depends testWhetherInvalidKeywordsCauseAnError
-     * @depends testWhetherInvalidEmbeddedKeywordsCauseAnError
-     * @depends testWhetherSuperfluousQuotesCauseAnError
-     * @depends testWhetherMissingClosingQuotesCauseAnError
-     * @depends testWhetherMissingSpacesAfterAValidKeywordCauseAnError
-     * @depends testWhetherInvalidHashIdentifiersCauseAnError
-     */
     public function testWhetherParserParsesAWholeFile()
     {
         $parserResult = $this->parseString(<<<EOT
@@ -475,7 +444,7 @@ msgctxt "Message context"
 msgid "To "
 "translate"
 msgstr "Zu "
-"übersetzten"
+"übersetzen"
 
 # This is a comment for a normal entry
 msgid_plural "Translation for plural"
@@ -490,121 +459,120 @@ EOT
         $this->assertEquals(
             "TranslatorComment is here",
             $parserResult[0]['translator_comments'][0],
-            'CatalogParser does not properly parse the first line in translator comments'
+            'CatalogParser does not properly parse the first line in translator comments in complete file test'
         );
 
         $this->assertEquals(
             "and some more translator comments",
             $parserResult[0]['translator_comments'][1],
-            'CatalogParser does not properly parse the second line in translator comments'
+            'CatalogParser does not properly parse the second line in translator comments in complete file test'
         );
 
         $this->assertEquals(
             "Header: Info\nMore header info: info\nMore header info: info\nMore header info: info\n",
             $parserResult[0]['msgstr'][0],
-            'CatalogParser does not properly parse the header correctly'
+            'CatalogParser does not properly parse the header correctly in complete file test'
         );
 
         $this->assertEquals(
             "This is an extracted comment",
             $parserResult[1]['extracted_comments'][0],
-            'CatalogParser does not properly parse extracted comments correctly'
+            'CatalogParser does not properly parse extracted comments correctly in complete file test'
         );
 
         $this->assertEquals(
             "/this/is/a/path:123",
             $parserResult[1]['paths'][0],
-            'CatalogParser does not properly parse the first path correctly'
+            'CatalogParser does not properly parse the first path correctly in complete file test'
         );
 
         $this->assertEquals(
             "/this/is/another/path:456",
             $parserResult[1]['paths'][1],
-            'CatalogParser does not properly parse the second path correctly'
+            'CatalogParser does not properly parse the second path correctly in complete file test'
         );
 
         $this->assertEquals(
             "/this/is/yet/another/path:789",
             $parserResult[1]['paths'][2],
-            'CatalogParser does not properly parse the third path correctly'
+            'CatalogParser does not properly parse the third path correctly in complete file test'
         );
 
         $this->assertEquals(
             "php-format",
             $parserResult[1]['flags'][0],
-            'CatalogParser does not properly parse the first flag correctly'
+            'CatalogParser does not properly parse the first flag correctly in complete file test'
         );
 
         $this->assertEquals(
             "fuzzy",
             $parserResult[1]['flags'][1],
-            'CatalogParser does not properly parse the second flag correctly'
+            'CatalogParser does not properly parse the second flag correctly in complete file test'
         );
 
         $this->assertEquals(
             "Message context",
             $parserResult[1]['msgctxt'],
-            'CatalogParser does not properly parse the message context correctly'
+            'CatalogParser does not properly parse the message context correctly in complete file test'
         );
 
         $this->assertEquals(
             "To be translated",
             $parserResult[1]['previous_msgid'],
-            'CatalogParser does not properly parse the previous message id correctly'
+            'CatalogParser does not properly parse the previous message id correctly in complete file test'
         );
 
         $this->assertEquals(
             "To translate",
             $parserResult[1]['msgid'],
-            'CatalogParser does not properly parse the message id correctly'
+            'CatalogParser does not properly parse the message id correctly in complete file test'
         );
 
         $this->assertEquals(
-            "Zu übersetzten",
+            "Zu übersetzen",
             $parserResult[1]['msgstr'][0],
-            'CatalogParser does not properly parse the message correctly'
+            'CatalogParser does not properly parse the message correctly in complete file test'
         );
 
         $this->assertEquals(
             "This is a comment for a normal entry",
             $parserResult[2]['translator_comments'][0],
-            'CatalogParser does not properly parse the translator comments correctly'
+            'CatalogParser does not properly parse the translator comments correctly in complete file test'
         );
 
         $this->assertEquals(
             "Translation for plural",
             $parserResult[2]['msgid_plural'],
-            'CatalogParser does not properly parse message id plural correctly'
+            'CatalogParser does not properly parse message id plural correctly in complete file test'
         );
 
         $this->assertEquals(
             "Übersetzung für plural 1",
             $parserResult[2]['msgstr'][0],
-            'CatalogParser does not properly parse the first plural message correctly'
+            'CatalogParser does not properly parse the first plural message correctly in complete file test'
         );
 
         $this->assertEquals(
             "Übersetzung für plural 2",
             $parserResult[2]['msgstr'][1],
-            'CatalogParser does not properly parse the second plural message correctly'
+            'CatalogParser does not properly parse the second plural message correctly in complete file test'
         );
 
-        $this->assertEquals(
-            true,
+        $this->assertTrue(
             $parserResult[3]['obsolete'],
-            'CatalogParser does not set obsolete correctly'
+            'CatalogParser does not set obsolete correctly in complete file test'
         );
 
         $this->assertEquals(
             "Obsolete message id",
             $parserResult[3]['msgid'],
-            'CatalogParser does not properly parse obsolete message id correctly'
+            'CatalogParser does not properly parse obsolete message id correctly in complete file test'
         );
 
         $this->assertEquals(
             "Obsolete message string",
             $parserResult[3]['msgstr'][0],
-            'CatalogParser does not properly parse obsolete message correctly'
+            'CatalogParser does not properly parse obsolete message correctly in complete file test'
         );
 
     }



More information about the icinga-checkins mailing list