@@ -967,8 +967,7 @@ public static function getResponsesForOneLocaleAndOneDomain(): \Generator
967967 </body>
968968 </file>
969969</xliff>
970- XLIFF
971- ,
970+ XLIFF,
972971 $ expectedTranslatorBagEn ,
973972 ];
974973
@@ -997,8 +996,7 @@ public static function getResponsesForOneLocaleAndOneDomain(): \Generator
997996 </body>
998997 </file>
999998</xliff>
1000- XLIFF
1001- ,
999+ XLIFF,
10021000 $ expectedTranslatorBagFr ,
10031001 ];
10041002 }
@@ -1049,8 +1047,7 @@ public static function getResponsesForManyLocalesAndManyDomains(): \Generator
10491047 </body>
10501048 </file>
10511049</xliff>
1052- XLIFF
1053- ,
1050+ XLIFF,
10541051 'messages+intl-icu ' => <<<'XLIFF'
10551052<?xml version="1.0" encoding="UTF-8"?>
10561053<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd">
@@ -1066,8 +1063,7 @@ public static function getResponsesForManyLocalesAndManyDomains(): \Generator
10661063 </body>
10671064 </file>
10681065</xliff>
1069- XLIFF
1070- ,
1066+ XLIFF,
10711067 'validators ' => <<<'XLIFF'
10721068<?xml version="1.0" encoding="UTF-8"?>
10731069<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd">
@@ -1087,8 +1083,7 @@ public static function getResponsesForManyLocalesAndManyDomains(): \Generator
10871083 </body>
10881084 </file>
10891085</xliff>
1090- XLIFF
1091- ,
1086+ XLIFF,
10921087 ],
10931088 'fr ' => [
10941089 'messages ' => <<<'XLIFF'
@@ -1106,8 +1101,7 @@ public static function getResponsesForManyLocalesAndManyDomains(): \Generator
11061101 </body>
11071102 </file>
11081103</xliff>
1109- XLIFF
1110- ,
1104+ XLIFF,
11111105 'messages+intl-icu ' => <<<'XLIFF'
11121106<?xml version="1.0" encoding="UTF-8"?>
11131107<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd">
@@ -1123,8 +1117,7 @@ public static function getResponsesForManyLocalesAndManyDomains(): \Generator
11231117 </body>
11241118 </file>
11251119</xliff>
1126- XLIFF
1127- ,
1120+ XLIFF,
11281121 'validators ' => <<<'XLIFF'
11291122<?xml version="1.0" encoding="UTF-8"?>
11301123<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd">
@@ -1144,8 +1137,7 @@ public static function getResponsesForManyLocalesAndManyDomains(): \Generator
11441137 </body>
11451138 </file>
11461139</xliff>
1147- XLIFF
1148- ,
1140+ XLIFF,
11491141 ],
11501142 ],
11511143 $ expectedTranslatorBag ,
@@ -1171,6 +1163,34 @@ public static function getResponsesForReadWithLastModified(): \Generator
11711163 }
11721164 }
11731165
1166+ public function testReadForAllDomains ()
1167+ {
1168+ $ loader = $ this ->getLoader ();
1169+
1170+ $ loader
1171+ ->expects ($ this ->once ())
1172+ ->method ('load ' )
1173+ ->willReturn ($ this ->createMock (MessageCatalogue::class));
1174+
1175+ $ provider = self ::createProvider (
1176+ new MockHttpClient ([
1177+ function (string $ method , string $ url , array $ options = []): ResponseInterface {
1178+ $ this ->assertSame ('GET ' , $ method );
1179+ $ this ->assertSame ('https://localise.biz/api/export/locale/fr.xlf?filter=&status=translated%2Cblank-translation ' , $ url );
1180+ $ this ->assertSame (['filter ' => '' , 'status ' => 'translated,blank-translation ' ], $ options ['query ' ]);
1181+
1182+ return new MockResponse ();
1183+ },
1184+ ], 'https://localise.biz/api/ ' ),
1185+ $ this ->getLoader (),
1186+ $ this ->getLogger (),
1187+ $ this ->getDefaultLocale (),
1188+ 'localise.biz/api/ ' ,
1189+ );
1190+
1191+ $ this ->translatorBag = $ provider ->read (['* ' ], ['fr ' ]);
1192+ }
1193+
11741194 public function testReadWithRestrictToStatus ()
11751195 {
11761196 $ loader = $ this ->getLoader ();
0 commit comments