protected function ProductVariationResourceTest::getExpectedCacheContexts in Commerce Core 8.2
The expected cache contexts for the GET/HEAD response of the test entity.
Parameters
array|null $sparse_fieldset: If a sparse fieldset is being requested, limit the expected cache contexts for this entity's fields to just these fields.
Return value
string[] A set of cache contexts.
Overrides ResourceTestBase::getExpectedCacheContexts
See also
::testGetIndividual()
File
- modules/
product/ tests/ src/ Functional/ Jsonapi/ ProductVariationResourceTest.php, line 304
Class
- ProductVariationResourceTest
- JSON:API resource test for variations.
Namespace
Drupal\Tests\commerce_product\Functional\JsonapiCode
protected function getExpectedCacheContexts(array $sparse_fieldset = NULL) {
$cacheability = parent::getExpectedCacheContexts($sparse_fieldset);
$cacheability[] = 'store';
$cacheability[] = 'url.query_args:v';
sort($cacheability);
return $cacheability;
}