protected function MockingTrait::createTestServer in GraphQL 8.4
Create test server.
Parameters
string $schema:
string $endpoint:
array $values:
Throws
\Drupal\Core\Entity\EntityStorageException
2 calls to MockingTrait::createTestServer()
- DisabledResultCacheTest::testDisabledCache in tests/
src/ Kernel/ Framework/ DisabledResultCacheTest.php - Test if disabling the result cache has the desired effect.
- MockingTrait::setUpSchema in tests/
src/ Traits/ MockingTrait.php - Setup server with schema.
File
- tests/
src/ Traits/ MockingTrait.php, line 106
Class
- MockingTrait
- Contains helpers for setting up mock servers and schemas for testing.
Namespace
Drupal\Tests\graphql\TraitsCode
protected function createTestServer($schema, $endpoint, array $values = []) : void {
$this->server = Server::create([
'schema' => $schema,
'name' => $this->randomGenerator
->name(),
'endpoint' => $endpoint,
] + $values);
$this->server
->save();
}