public function EntityTest::testResolveDescription in GraphQL 8.4
@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\Entity\EntityDescription::resolve
File
- tests/
src/ Kernel/ DataProducer/ EntityTest.php, line 132
Class
- EntityTest
- Data producers Entity test class.
Namespace
Drupal\Tests\graphql\Kernel\DataProducerCode
public function testResolveDescription() : void {
$entity = $this
->getMockBuilder(EntityTestBundle::class)
->disableOriginalConstructor()
->getMock();
$entity
->expects($this
->once())
->method('getDescription')
->willReturn('Dummy description');
$this
->assertEquals('Dummy description', $this
->executeDataProducer('entity_description', [
'entity' => $entity,
]));
}