protected function QueryResultAssertionTrait::defaultCacheMetaData in GraphQL 8.4
Same name and namespace in other branches
- 8.3 tests/src/Traits/QueryResultAssertionTrait.php \Drupal\Tests\graphql\Traits\QueryResultAssertionTrait::defaultCacheMetaData()
The default cache metadata object.
Return value
\Drupal\Core\Cache\CacheableMetadata The cache metadata object.
5 calls to QueryResultAssertionTrait::defaultCacheMetaData()
- BufferedFieldTest::testBatchedFields in tests/
src/ Kernel/ Framework/ BufferedFieldTest.php - Test if the schema is created properly.
- EntityBufferTest::testEntityBuffer in tests/
src/ Kernel/ EntityBufferTest.php - Tests the entity buffer.
- EntityUuidBufferTest::testEntityUuidBuffer in tests/
src/ Kernel/ EntityUuidBufferTest.php - Tests the entity UUID buffer.
- QueryResultAssertionTrait::assertResults in tests/
src/ Traits/ QueryResultAssertionTrait.php - Assert a result for a graphql query and variables.
- TestFrameworkTest::testFieldMock in tests/
src/ Kernel/ Framework/ TestFrameworkTest.php - Test mocked fields.
File
- tests/
src/ Traits/ QueryResultAssertionTrait.php, line 56
Class
- QueryResultAssertionTrait
- Trait for easier assertion on GraphQL query results.
Namespace
Drupal\Tests\graphql\TraitsCode
protected function defaultCacheMetaData() {
$metadata = new CacheableMetadata();
$metadata
->setCacheMaxAge($this
->defaultCacheMaxAge());
$metadata
->setCacheTags($this
->defaultCacheTags());
$metadata
->setCacheContexts($this
->defaultCacheContexts());
return $metadata;
}