public function JsonLdSchemaTest::testSchema in Thunder 6.2.x
Tests the jsonld extension.
Throws
\GuzzleHttp\Exception\GuzzleException
File
- modules/
thunder_gqls/ tests/ src/ Functional/ JsonLdSchemaTest.php, line 24
Class
- JsonLdSchemaTest
- Test the schema.
Namespace
Drupal\Tests\thunder_gqls\FunctionalCode
public function testSchema() {
$tags = $this
->config('metatag.metatag_defaults.node__article')
->get('tags');
$tags['schema_article_type'] = 'Article';
$this
->config('metatag.metatag_defaults.node__article')
->set('tags', $tags)
->save();
$extensions = $this
->config('graphql.graphql_servers.thunder_graphql')
->get('schema_configuration.thunder.extensions');
$extensions['thunder_jsonld'] = 'thunder_jsonld';
$this
->config('graphql.graphql_servers.thunder_graphql')
->set('schema_configuration.thunder.extensions', $extensions)
->save();
$this
->drupalLogin($this->graphqlUser);
$this
->runAndTestQuery('jsonld');
}