Browse Source

Add test case for quoted strings

Jasper Smet 11 years ago
parent
commit
bf0cd7ef2f
1 changed files with 13 additions and 0 deletions
  1. 13 0
      tests/TestCase/I18n/Parser/PoFileParserTest.php

+ 13 - 0
tests/TestCase/I18n/Parser/PoFileParserTest.php

@@ -73,4 +73,17 @@ class PoFileParserTest extends TestCase {
 		$this->assertCount(12, $messages);
 		$this->assertTextEquals("v\nsecond line", $messages["valid\nsecond line"]);
 	}
+
+/**
+ * Test parsing a file with quoted strings
+ *
+ * @return void
+ */
+	public function testQuotedString() {
+		$parser = new PoFileParser;
+		$file = APP . 'Locale' . DS . 'en' . DS . 'default.po';
+		$messages = $parser->parse($file);
+
+		$this->assertTextEquals('this is a "quoted string" (translated)', $messages['this is a "quoted string"']);
+	}
 }