public function EntityTest::testResolveEntityRendered in GraphQL 8.4
@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\Entity\EntityLoad::resolve
File
- tests/
src/ Kernel/ DataProducer/ EntityTest.php, line 372
Class
- EntityTest
- Data producers Entity test class.
Namespace
Drupal\Tests\graphql\Kernel\DataProducerCode
public function testResolveEntityRendered() : void {
$result = $this
->executeDataProducer('entity_rendered', [
'entity' => $this->node,
'mode' => 'default',
]);
// @todo Add metadata check.
// $this->assertContains('node:1', $metadata->getCacheTags());
$this
->assertStringContainsString('<a href="/node/1" rel="bookmark"><span>' . $this->node
->getTitle() . '</span>', $result);
}