You are here

public function SecureFieldTest::testByPassFieldSecurity in GraphQL 8.3

Check if the bypass permission works as expected.

File

tests/src/Kernel/Framework/SecureFieldTest.php, line 69

Class

SecureFieldTest
Test access restrictions on secure fields.

Namespace

Drupal\Tests\graphql\Kernel\Framework

Code

public function testByPassFieldSecurity() {
  $this->accountProphecy
    ->hasPermission('bypass graphql field security')
    ->willReturn(TRUE);
  $this
    ->assertResults('{ insecure }', [], [
    'insecure' => TRUE,
  ], $this
    ->defaultCacheMetaData());
}