You are here

public function EntityTest::testResolveId in GraphQL 8.4

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

File

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

Class

EntityTest
Data producers Entity test class.

Namespace

Drupal\Tests\graphql\Kernel\DataProducer

Code

public function testResolveId() : void {
  $this->entity
    ->expects($this
    ->once())
    ->method('id')
    ->willReturn(5);
  $this
    ->assertEquals(5, $this
    ->executeDataProducer('entity_id', [
    'entity' => $this->entity,
  ]));
}