You are here

public function EntityTest::testResolveTranslatedEntityLoad in GraphQL 8.4

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

File

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

Class

EntityTest
Data producers Entity test class.

Namespace

Drupal\Tests\graphql\Kernel\DataProducer

Code

public function testResolveTranslatedEntityLoad() : void {
  $result = $this
    ->executeDataProducer('entity_load', [
    'type' => $this->node
      ->getEntityTypeId(),
    'id' => $this->node
      ->id(),
    'language' => 'fr',
  ]);
  $this
    ->assertEquals('fr', $result
    ->language()
    ->getId());
  $this
    ->assertEquals('sit amet fr', $result
    ->getTitle());
}