Code Duplication    Length = 13-13 lines in 3 locations

modules/graphql_legacy/graphql_mutation/tests/src/Kernel/CreateEntityTest.php 1 location

@@ 32-44 (lines=13) @@
29
  /**
30
   * {@inheritdoc}
31
   */
32
  protected function setUp() {
33
    parent::setUp();
34
    $this->installConfig('node');
35
    $this->installConfig('filter');
36
    $this->installEntitySchema('node');
37
    $this->installSchema('node', 'node_access');
38
    $this->createContentType(['type' => 'test']);
39
40
    Role::load('anonymous')
41
      ->grantPermission('access content')
42
      ->grantPermission('create test content')
43
      ->save();
44
  }
45
46
  /**
47
   * Test creation with a simple text field.

modules/graphql_legacy/graphql_mutation/tests/src/Kernel/DeleteEntityTest.php 1 location

@@ 34-46 (lines=13) @@
31
  /**
32
   * {@inheritdoc}
33
   */
34
  protected function setUp() {
35
    parent::setUp();
36
    $this->installConfig('node');
37
    $this->installConfig('filter');
38
    $this->installEntitySchema('node');
39
    $this->installSchema('node', 'node_access');
40
    $this->createContentType(['type' => 'test']);
41
42
    Role::load('anonymous')
43
      ->grantPermission('access content')
44
      ->grantPermission('delete any test content')
45
      ->save();
46
  }
47
48
  /**
49
   * Test deletion.

modules/graphql_legacy/graphql_mutation/tests/src/Kernel/UpdateEntityTest.php 1 location

@@ 34-46 (lines=13) @@
31
  /**
32
   * {@inheritdoc}
33
   */
34
  protected function setUp() {
35
    parent::setUp();
36
    $this->installConfig('node');
37
    $this->installConfig('filter');
38
    $this->installEntitySchema('node');
39
    $this->installSchema('node', 'node_access');
40
    $this->createContentType(['type' => 'test']);
41
42
    Role::load('anonymous')
43
      ->grantPermission('access content')
44
      ->grantPermission('edit any test content')
45
      ->save();
46
  }
47
48
  /**
49
   * Test update with a simple text field.