You are here

protected function GraphQLTestBase::setUp in GraphQL 8.4

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

Overrides KernelTestBase::setUp

21 calls to GraphQLTestBase::setUp()
BufferedFieldTest::setUp in tests/src/Kernel/Framework/BufferedFieldTest.php
DisabledResultCacheTest::setUp in tests/src/Kernel/Framework/DisabledResultCacheTest.php
EntityBufferTest::setUp in tests/src/Kernel/EntityBufferTest.php
EntityDefinitionTest::setUp in tests/src/Kernel/DataProducer/EntityDefinitionTest.php
EntityMultipleTest::setUp in tests/src/Kernel/DataProducer/EntityMultipleTest.php

... See full list

21 methods override GraphQLTestBase::setUp()
BufferedFieldTest::setUp in tests/src/Kernel/Framework/BufferedFieldTest.php
DisabledResultCacheTest::setUp in tests/src/Kernel/Framework/DisabledResultCacheTest.php
EntityBufferTest::setUp in tests/src/Kernel/EntityBufferTest.php
EntityDefinitionTest::setUp in tests/src/Kernel/DataProducer/EntityDefinitionTest.php
EntityMultipleTest::setUp in tests/src/Kernel/DataProducer/EntityMultipleTest.php

... See full list

File

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

Class

GraphQLTestBase
Provides helper methods for kernel tests in GraphQL module.

Namespace

Drupal\Tests\graphql\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installConfig('system');
  $this
    ->installConfig('graphql');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('node', [
    'node_access',
  ]);
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this
    ->installEntitySchema('graphql_server');
  $this
    ->installEntitySchema('configurable_language');
  $this
    ->installConfig([
    'language',
  ]);
  $this
    ->setUpCurrentUser([], $this
    ->userPermissions());
  ConfigurableLanguage::create([
    'id' => 'fr',
    'weight' => 1,
  ])
    ->save();
  ConfigurableLanguage::create([
    'id' => 'de',
    'weight' => 2,
  ])
    ->save();
  $this->builder = new ResolverBuilder();
}