protected function EntityBufferTest::setUp in GraphQL 8.4
Overrides GraphQLTestBase::setUp
File
- tests/
src/ Kernel/ EntityBufferTest.php, line 28
Class
- EntityBufferTest
- Tests the entity buffer system that it returns the correct cache metadata.
Namespace
Drupal\Tests\graphql\KernelCode
protected function setUp() : void {
parent::setUp();
NodeType::create([
'type' => 'test',
'name' => 'Test',
])
->save();
foreach (range(1, 3) as $i) {
$node = Node::create([
'title' => 'Node ' . $i,
'type' => 'test',
]);
$node
->save();
$this->nodeIds[] = $node
->id();
}
$schema = <<<GQL
type Query {
node(id: String): Node
}
type Node {
title: String!
}
GQL;
$this
->setUpSchema($schema);
}