You are here

protected function GraphQLTestBase::defaultCacheTags in GraphQL 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/GraphQLTestBase.php \Drupal\Tests\graphql\Kernel\GraphQLTestBase::defaultCacheTags()

Returns the default cache tags used in assertions for this test.

Return value

string[] The list of cache tags.

Overrides QueryResultAssertionTrait::defaultCacheTags

1 call to GraphQLTestBase::defaultCacheTags()
EntityDefinitionTest::defaultCacheTags in tests/src/Kernel/DataProducer/EntityDefinitionTest.php
Returns the default cache tags used in assertions for this test.
1 method overrides GraphQLTestBase::defaultCacheTags()
EntityDefinitionTest::defaultCacheTags in tests/src/Kernel/DataProducer/EntityDefinitionTest.php
Returns the default cache tags used in assertions for this test.

File

tests/src/Kernel/GraphQLTestBase.php, line 95

Class

GraphQLTestBase
Provides helper methods for kernel tests in GraphQL module.

Namespace

Drupal\Tests\graphql\Kernel

Code

protected function defaultCacheTags() : array {
  $tags = [
    'graphql_response',
  ];
  if (isset($this->server)) {
    array_push($tags, "config:graphql.graphql_servers.{$this->server->id()}");
  }
  return $tags;
}