@@ -246,17 +246,10 @@ public function testAttributeListCacheInvalidateOnAttributeDelete()
246
246
}
247
247
}
248
248
249
- if (empty ($ response ['body ' ]['attributesList ' ]['items ' ])) {
250
- $ this ->assertCacheMissAndReturnResponse (
251
- self ::QUERY ,
252
- [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
253
- );
254
- } else {
255
- $ this ->assertCacheHitAndReturnResponse (
256
- self ::QUERY ,
257
- [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
258
- );
259
- }
249
+ $ this ->assertCacheHitAndReturnResponse (
250
+ self ::QUERY ,
251
+ [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
252
+ );
260
253
}
261
254
262
255
#[
@@ -288,22 +281,14 @@ public function testAttributeListCacheInvalidateOnAttributeEdit()
288
281
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
289
282
);
290
283
291
- $ response = $ this ->assertCacheMissAndReturnResponse (
284
+ $ this ->assertCacheMissAndReturnResponse (
292
285
self ::QUERY_ADDRESS ,
293
286
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheAddressId ]
294
287
);
295
-
296
- if (empty ($ response ['body ' ]['attributesList ' ]['items ' ])) {
297
- $ this ->assertCacheMissAndReturnResponse (
298
- self ::QUERY_ADDRESS ,
299
- [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
300
- );
301
- } else {
302
- $ this ->assertCacheHitAndReturnResponse (
303
- self ::QUERY_ADDRESS ,
304
- [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
305
- );
306
- }
288
+ $ this ->assertCacheHitAndReturnResponse (
289
+ self ::QUERY_ADDRESS ,
290
+ [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
291
+ );
307
292
308
293
$ customerAttribute0 ->setDefaultValue ('after change default value ' );
309
294
$ this ->eavAttributeRepo ->save ($ customerAttribute0 );
@@ -317,7 +302,7 @@ public function testAttributeListCacheInvalidateOnAttributeEdit()
317
302
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
318
303
);
319
304
320
- $ this ->assertCacheMissAndReturnResponse (
305
+ $ this ->assertCacheHitAndReturnResponse (
321
306
self ::QUERY_ADDRESS ,
322
307
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheAddressId ]
323
308
);
@@ -403,22 +388,15 @@ public function testAttributesListCacheMissAndHitNewAttribute()
403
388
{
404
389
$ cacheId = $ this ->getCacheIdHeader (self ::QUERY );
405
390
406
- $ response = $ this ->assertCacheMissAndReturnResponse (
391
+ $ this ->assertCacheMissAndReturnResponse (
407
392
self ::QUERY ,
408
393
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
409
394
);
410
395
411
- if (empty ($ response ['body ' ]['attributesList ' ]['items ' ])) {
412
- $ this ->assertCacheMissAndReturnResponse (
413
- self ::QUERY ,
414
- [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
415
- );
416
- } else {
417
- $ this ->assertCacheHitAndReturnResponse (
418
- self ::QUERY ,
419
- [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
420
- );
421
- }
396
+ $ this ->assertCacheHitAndReturnResponse (
397
+ self ::QUERY ,
398
+ [CacheIdCalculator::CACHE_ID_HEADER => $ cacheId ]
399
+ );
422
400
423
401
$ newAttributeCreate = Bootstrap::getObjectManager ()->get (CustomerAttribute::class);
424
402
/** @var AttributeInterface $newAttribute */
0 commit comments