@@ -219,6 +219,13 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
219219 $ productNameInFixtureStore = 'Product \'s Name in Fixture Store ' ;
220220 $ product ->setName ($ productNameInFixtureStore )->setStoreId ($ storeId )->save ();
221221
222+ // test cached response store + currency header with non existing currency, and no valid response, no cache
223+ $ headerMap = ['Store ' => $ storeCodeFromFixture , 'Content-Currency ' => 'SOMECURRENCY ' ];
224+ $ this ->expectExceptionMessage (
225+ 'GraphQL response contains errors: Please correct the target currency '
226+ );
227+ $ this ->graphQlQuery ($ query , [], '' , $ headerMap );
228+
222229 // test store header only, query is cached at this point in EUR
223230 $ headerMap = ['Store ' => $ storeCodeFromFixture ];
224231 $ response = $ this ->graphQlQuery ($ query , [], '' , $ headerMap );
@@ -302,12 +309,5 @@ public function testProductFromSpecificAndDefaultStoreWithMultiCurrency()
302309 $ response ['products ' ]['items ' ][0 ]['price ' ]['minimalPrice ' ]['amount ' ]['currency ' ],
303310 'Currency code USD in fixture store default is unexpected '
304311 );
305-
306- // test cached response store + currency header with non existing currency, and no valid response, no cache
307- $ headerMap = ['Store ' => $ storeCodeFromFixture , 'Content-Currency ' => 'SOMECURRENCY ' ];
308- $ this ->expectExceptionMessage (
309- 'GraphQL response contains errors: Requested store is not found (fixture_second_store) '
310- );
311- $ this ->graphQlQuery ($ query , [], '' , $ headerMap );
312312 }
313313}
0 commit comments