File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
This template is used for translation message extraction tests
2
- <?php echo $ view ['translator ' ]->trans ('new key ' ) ?>
2
+ <?php echo $ view ['translator ' ]->trans ('single-quoted key ' ) ?>
3
+ <?php echo $ view ['translator ' ]->trans ("double-quoted key " ) ?>
Original file line number Diff line number Diff line change @@ -28,8 +28,9 @@ public function testExtraction()
28
28
$ extractor ->extract (__DIR__ .'/../Fixtures/Resources/views/ ' , $ catalogue );
29
29
30
30
// Assert
31
- $ this ->assertCount (1 , $ catalogue ->all ('messages ' ), '->extract() should find 1 translation ' );
32
- $ this ->assertTrue ($ catalogue ->has ('new key ' ), '->extract() should find at leat "new key" message ' );
33
- $ this ->assertEquals ('prefixnew key ' , $ catalogue ->get ('new key ' ), '->extract() should apply "prefix" as prefix ' );
31
+ $ this ->assertCount (2 , $ catalogue ->all ('messages ' ), '->extract() should find 1 translation ' );
32
+ $ this ->assertTrue ($ catalogue ->has ('single-quoted key ' ), '->extract() should find the "single-quoted key" message ' );
33
+ $ this ->assertTrue ($ catalogue ->has ('double-quoted key ' ), '->extract() should find the "double-quoted key" message ' );
34
+ $ this ->assertEquals ('prefixsingle-quoted key ' , $ catalogue ->get ('single-quoted key ' ), '->extract() should apply "prefix" as prefix ' );
34
35
}
35
36
}
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ protected function parseTokens($tokens, MessageCatalogue $catalog)
111
111
}
112
112
}
113
113
114
- $ message = trim ($ message , '\'' );
114
+ $ message = trim ($ message , '\'" ' );
115
115
116
116
if ($ message ) {
117
117
$ catalog ->set ($ message , $ this ->prefix .$ message );
You can’t perform that action at this time.
0 commit comments