You are here

public function ThunderGqlsTestBase::getVariablesFromFile in Thunder 6.2.x

Retrieve the GraphQL variables stored in a file as string.

Parameters

string $name: The example name.

Return value

string The graphql variables string.

1 call to ThunderGqlsTestBase::getVariablesFromFile()
ThunderGqlsTestBase::runAndTestQuery in modules/thunder_gqls/tests/src/Functional/ThunderGqlsTestBase.php
Execute query and compare to expected response.

File

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

Class

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

Namespace

Drupal\Tests\thunder_gqls\Functional

Code

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