From 3c91a8b8539dcaa93a1f1fa1d48bf407d6a1b5ee Mon Sep 17 00:00:00 2001 From: mscherer Date: Mon, 22 May 2017 15:44:55 +0200 Subject: [PATCH] Add more thorough test case. --- tests/TestCase/I18n/Parser/PoFileParserTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/TestCase/I18n/Parser/PoFileParserTest.php b/tests/TestCase/I18n/Parser/PoFileParserTest.php index f979a068780..8e6cacf7605 100644 --- a/tests/TestCase/I18n/Parser/PoFileParserTest.php +++ b/tests/TestCase/I18n/Parser/PoFileParserTest.php @@ -125,7 +125,14 @@ public function testParseContextOnSomeMessages() return $package; }); - $this->assertTextEquals('En cours', $messages['Pending']['_context']['']); - $this->assertTextEquals('En resolved', $messages['Resolved']['_context']['']); + $this->assertSame('En cours', $messages['Pending']['_context']['']); + $this->assertSame('En cours - context', $messages['Pending']['_context']['Pay status']); + $this->assertSame('En resolved', $messages['Resolved']['_context']['']); + $this->assertSame('En resolved - context', $messages['Resolved']['_context']['Pay status']); + + $this->assertSame('En cours', __('Pending')); + $this->assertSame('En cours - context', __x('Pay status', 'Pending')); + $this->assertSame('En resolved', __('Resolved')); + $this->assertSame('En resolved - context', __x('Pay status', 'Resolved')); } }