public function EntityMultipleTest::setUp in GraphQL 8.4
Overrides GraphQLTestBase::setUp
File
- tests/
src/ Kernel/ DataProducer/ EntityMultipleTest.php, line 42
Class
- EntityMultipleTest
- Data producers Entity multiple test class.
Namespace
Drupal\Tests\graphql\Kernel\DataProducerCode
public function setUp() : void {
parent::setUp();
$this->entity = $this
->getMockBuilder(NodeInterface::class)
->disableOriginalConstructor()
->getMock();
$this->entity_interface = $this
->getMockBuilder(EntityInterface::class)
->disableOriginalConstructor()
->getMock();
$this->user = $this
->getMockBuilder(UserInterface::class)
->disableOriginalConstructor()
->getMock();
$content_type = NodeType::create([
'type' => 'lorem',
'name' => 'ipsum',
'translatable' => TRUE,
'display_submitted' => FALSE,
]);
$content_type
->save();
$this->node1 = Node::create([
'title' => 'Dolor',
'type' => 'lorem',
'status' => NodeInterface::PUBLISHED,
]);
$this->node1
->save();
$this->node2 = Node::create([
'title' => 'Dolor',
'type' => 'lorem',
'status' => NodeInterface::PUBLISHED,
]);
$this->node2
->save();
$this->node3 = Node::create([
'title' => 'Dolor',
'type' => 'lorem',
'status' => NodeInterface::NOT_PUBLISHED,
]);
$this->node3
->save();
}