@@ -112,13 +112,13 @@ public function testCacheIsInvalidatedOnPageUpdate()
112
112
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheIdPageBlankResponse ]
113
113
);
114
114
115
- //cache-debug should be a MISS after updating the blank page
115
+ //updating the blank page
116
116
$ pageRepository = Bootstrap::getObjectManager ()->get (PageRepository::class);
117
117
$ newPageContent = 'New page content for blank page. ' ;
118
118
$ pageBlank ->setContent ($ newPageContent );
119
119
$ pageRepository ->save ($ pageBlank );
120
- $ pageBlankResponseMissAfterUpdate = $ this -> graphQlQueryWithResponseHeaders ( $ pageBlankQuery );
121
- // Verify we obtain a cache MISS after updating the page blank query
120
+
121
+ // Verify we obtain a cache MISS on page blank query after updating the page blank
122
122
$ this ->assertCacheMissAndReturnResponse (
123
123
$ pageBlankQuery ,
124
124
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheIdPageBlankResponse ]
@@ -128,16 +128,16 @@ public function testCacheIsInvalidatedOnPageUpdate()
128
128
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheIdPageBlankResponse ]
129
129
);
130
130
131
- // Verify we obtain a cache Hit after updating the page on page 100 query
131
+ // Verify we obtain a cache HIT on page 100 query after updating the page blank
132
132
$ this ->assertCacheHitAndReturnResponse (
133
133
$ page100Query ,
134
134
[CacheIdCalculator::CACHE_ID_HEADER => $ cacheIdPage100Response ]
135
135
);
136
136
137
137
//updated page data should be correct for blank page
138
138
$ this ->assertNotEmpty ($ pageBlankResponseHitAfterUpdate ['body ' ]);
139
- $ pageData = $ pageBlankResponseMissAfterUpdate ['body ' ]['cmsPage ' ];
140
- $ this ->assertArrayNotHasKey ('errors ' , $ pageBlankResponseMissAfterUpdate ['body ' ]);
139
+ $ pageData = $ pageBlankResponseHitAfterUpdate ['body ' ]['cmsPage ' ];
140
+ $ this ->assertArrayNotHasKey ('errors ' , $ pageBlankResponseHitAfterUpdate ['body ' ]);
141
141
$ this ->assertEquals ('Cms Page Design Blank ' , $ pageData ['title ' ]);
142
142
$ this ->assertEquals ($ newPageContent , $ pageData ['content ' ]);
143
143
}
0 commit comments