protected function SecureFieldTest::setUp in GraphQL 8.3
Overrides GraphQLTestBase::setUp
File
- tests/
src/ Kernel/ Framework/ SecureFieldTest.php, line 30
Class
- SecureFieldTest
- Test access restrictions on secure fields.
Namespace
Drupal\Tests\graphql\Kernel\FrameworkCode
protected function setUp() {
parent::setUp();
$this
->mockField('secure', [
'name' => 'secure',
'type' => 'Boolean',
'secure' => TRUE,
], new CacheableValue(TRUE, [
(new CacheableMetadata())
->addCacheContexts([
'user.permissions',
]),
]));
$this
->mockField('insecure', [
'name' => 'insecure',
'type' => 'Boolean',
'secure' => FALSE,
], new CacheableValue(TRUE, [
(new CacheableMetadata())
->addCacheContexts([
'user.permissions',
]),
]));
}