BundleLessEntityTest.php in GraphQL 8.3
File
modules/graphql_core/tests/src/Kernel/Entity/BundleLessEntityTest.php
View source
<?php
namespace Drupal\Tests\graphql_core\Kernel\Entity;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\Tests\graphql_core\Kernel\GraphQLContentTestBase;
class BundleLessEntityTest extends GraphQLContentTestBase {
protected function setUp() {
parent::setUp();
FieldStorageConfig::create([
'field_name' => 'field_test',
'entity_type' => 'user',
'type' => 'boolean',
'cardinality' => 1,
])
->save();
FieldConfig::create([
'entity_type' => 'user',
'bundle' => 'user',
'field_name' => 'field_test',
'label' => 'Test',
])
->save();
}
public function testConfiguredField() {
$this
->assertGraphQLFields([
[
'User',
'fieldTest',
'Boolean',
],
]);
}
}