@@ -94,23 +94,30 @@ public function testCacheIsInvalidatedOnBlockUpdate()
94
94
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheIdOfEnabledBlock ]
95
95
);
96
96
97
- //cache-debug should be a MISS after updating content on fixture block
97
+ //updating content on fixture block
98
98
$ newBlockContent = 'New block content!!! ' ;
99
99
$ this ->updateBlockContent ($ fixtureBlockIdentifier , $ newBlockContent );
100
100
101
- // Verify we obtain a cache MISS on the fixture block query after the content update
101
+ // Verify we obtain a cache MISS on the fixture block query
102
+ // after the content update on the fixture block
102
103
$ fixtureBlockMissResponse = $ this ->assertCacheMissAndReturnResponse (
103
104
$ fixtureBlockQuery ,
104
105
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheIdOfFixtureBlock ]
105
106
);
106
107
108
+ $ fixtureBlockHitResponse = $ this ->assertCacheHitAndReturnResponse (
109
+ $ fixtureBlockQuery ,
110
+ [CacheIdCalculator::CACHE_ID_HEADER => $ cacheIdOfFixtureBlock ]
111
+ );
112
+
107
113
//Verify we obtain a cache HIT on the enabled block query after the fixture block is updated
108
- $ enabledBlockHitResponse = $ this ->assertCacheHitAndReturnResponse (
114
+ $ this ->assertCacheHitAndReturnResponse (
109
115
$ enabledBlockQuery ,
110
116
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheIdOfEnabledBlock ]
111
117
);
112
118
113
- $ this ->assertNotEmpty ($ enabledBlockHitResponse ['body ' ]);
119
+ $ this ->assertNotEmpty ($ fixtureBlockHitResponse ['body ' ]);
120
+
114
121
//updated block data should be correct on fixture block
115
122
$ blocks = $ fixtureBlockMissResponse ['body ' ]['cmsBlocks ' ]['items ' ];
116
123
$ this ->assertArrayNotHasKey ('errors ' , $ fixtureBlockMissResponse ['body ' ]);
0 commit comments