You are here

public function EntityTest::testResolveBundle in GraphQL 8.4

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

File

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

Class

EntityTest
Data producers Entity test class.

Namespace

Drupal\Tests\graphql\Kernel\DataProducer

Code

public function testResolveBundle() : void {
  $this->entity
    ->expects($this
    ->once())
    ->method('bundle')
    ->willReturn('page');
  $result = $this
    ->executeDataProducer('entity_bundle', [
    'entity' => $this->entity,
  ]);
  $this
    ->assertEquals('page', $result);
}