@@ -66,6 +66,34 @@ public function testDiff()
66
66
], $ this ->getAllMessagesFromTranslatorBag ($ bagResult ));
67
67
}
68
68
69
+ public function testDiffWithIntlDomain ()
70
+ {
71
+ $ catalogueA = new MessageCatalogue ('en ' , [
72
+ 'domain1+intl-icu ' => ['foo ' => 'foo ' , 'bar ' => 'bar ' ],
73
+ 'domain2 ' => ['baz ' => 'baz ' , 'qux ' => 'qux ' ],
74
+ ]);
75
+
76
+ $ bagA = new TranslatorBag ();
77
+ $ bagA ->addCatalogue ($ catalogueA );
78
+
79
+ $ catalogueB = new MessageCatalogue ('en ' , [
80
+ 'domain1 ' => ['foo ' => 'foo ' ],
81
+ 'domain2 ' => ['baz ' => 'baz ' , 'corge ' => 'corge ' ],
82
+ ]);
83
+
84
+ $ bagB = new TranslatorBag ();
85
+ $ bagB ->addCatalogue ($ catalogueB );
86
+
87
+ $ bagResult = $ bagA ->diff ($ bagB );
88
+
89
+ $ this ->assertEquals ([
90
+ 'en ' => [
91
+ 'domain1 ' => ['bar ' => 'bar ' ],
92
+ 'domain2 ' => ['qux ' => 'qux ' ],
93
+ ],
94
+ ], $ this ->getAllMessagesFromTranslatorBag ($ bagResult ));
95
+ }
96
+
69
97
public function testIntersect ()
70
98
{
71
99
$ catalogueA = new MessageCatalogue ('en ' , ['domain1 ' => ['foo ' => 'foo ' , 'bar ' => 'bar ' ], 'domain2 ' => ['baz ' => 'baz ' , 'qux ' => 'qux ' ]]);
0 commit comments