You are here

public function ThunderGqlsTestBase::getExpectedResponseFromFile in Thunder 6.2.x

Retrieve the GraphQL response stored in a file as string.

Parameters

string $name: The example name.

Return value

string The graphql response string.

File

modules/thunder_gqls/tests/src/Functional/ThunderGqlsTestBase.php, line 129

Class

ThunderGqlsTestBase
The base class for all functional Thunder GraphQl schema tests.

Namespace

Drupal\Tests\thunder_gqls\Functional

Code

public function getExpectedResponseFromFile(string $name) : string {
  return file_get_contents($this
    ->getQueriesDirectory() . '/' . $name . '.response.json');
}