You are here

public function EntityTest::testResolveAccess in GraphQL 8.4

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

File

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

Class

EntityTest
Data producers Entity test class.

Namespace

Drupal\Tests\graphql\Kernel\DataProducer

Code

public function testResolveAccess() : void {
  $this->entity
    ->expects($this
    ->any())
    ->method('access')
    ->willReturn(FALSE);
  $this
    ->assertFalse($this
    ->executeDataProducer('entity_access', [
    'entity' => $this->entity,
    'user' => $this->user,
    'operation' => 'delete',
  ]));
}