You are here

public function EntityTest::testResolveLabel in GraphQL 8.4

@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\Entity\EntityLabel::resolve

File

tests/src/Kernel/DataProducer/EntityTest.php, line 162

Class

EntityTest
Data producers Entity test class.

Namespace

Drupal\Tests\graphql\Kernel\DataProducer

Code

public function testResolveLabel() : void {
  $this->entity
    ->expects($this
    ->once())
    ->method('label')
    ->willReturn('Dummy label');
  $this
    ->assertEquals('Dummy label', $this
    ->executeDataProducer('entity_label', [
    'entity' => $this->entity,
  ]));
}