You are here

public function EntityTest::testResolveEntityTypeId in GraphQL 8.4

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

File

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

Class

EntityTest
Data producers Entity test class.

Namespace

Drupal\Tests\graphql\Kernel\DataProducer

Code

public function testResolveEntityTypeId() : void {
  $this->entity
    ->expects($this
    ->once())
    ->method('getEntityTypeId')
    ->willReturn('test_graphql');
  $this
    ->assertEquals('test_graphql', $this
    ->executeDataProducer('entity_type_id', [
    'entity' => $this->entity,
  ]));
}