1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Drupal\Tests\graphql_views\Kernel; |
4
|
|
|
|
5
|
|
|
use Drupal\taxonomy\Entity\Term; |
|
|
|
|
6
|
|
|
use Drupal\taxonomy\Entity\Vocabulary; |
|
|
|
|
7
|
|
|
use Drupal\Tests\field\Traits\EntityReferenceTestTrait; |
|
|
|
|
8
|
|
|
use Drupal\Tests\graphql\Kernel\GraphQLTestBase; |
|
|
|
|
9
|
|
|
use Drupal\Tests\node\Traits\ContentTypeCreationTrait; |
|
|
|
|
10
|
|
|
use Drupal\Tests\node\Traits\NodeCreationTrait; |
|
|
|
|
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Base class for test views support in GraphQL. |
14
|
|
|
* |
15
|
|
|
* @group graphql_views |
16
|
|
|
*/ |
17
|
|
|
abstract class ViewsTestBase extends GraphQLTestBase { |
18
|
|
|
use NodeCreationTrait; |
19
|
|
|
use ContentTypeCreationTrait; |
20
|
|
|
use EntityReferenceTestTrait; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* {@inheritdoc} |
24
|
|
|
*/ |
25
|
|
|
protected static $modules = [ |
26
|
|
|
'filter', |
27
|
|
|
'text', |
28
|
|
|
'views', |
29
|
|
|
'taxonomy', |
30
|
|
|
'graphql_views', |
31
|
|
|
'graphql_views_test', |
32
|
|
|
]; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* A List of letters. |
36
|
|
|
* |
37
|
|
|
* @var string[] |
38
|
|
|
*/ |
39
|
|
|
protected $letters = ['A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C']; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* {@inheritdoc} |
43
|
|
|
*/ |
44
|
|
|
protected function setUp(): void { |
45
|
|
|
parent::setUp(); |
46
|
|
|
$this->installEntitySchema('view'); |
47
|
|
|
$this->installEntitySchema('taxonomy_term'); |
48
|
|
|
$this->installConfig(['node', 'filter', 'views', 'graphql_views_test']); |
49
|
|
|
$this->createContentType(['type' => 'test']); |
50
|
|
|
$this->createEntityReferenceField('node', 'test', 'field_tags', 'Tags', 'taxonomy_term'); |
51
|
|
|
|
52
|
|
|
Vocabulary::create([ |
53
|
|
|
'name' => 'Tags', |
54
|
|
|
'vid' => 'tags', |
55
|
|
|
])->save(); |
56
|
|
|
|
57
|
|
|
$terms = []; |
58
|
|
|
|
59
|
|
|
$terms['A'] = Term::create([ |
60
|
|
|
'name' => 'Term A', |
61
|
|
|
'vid' => 'tags', |
62
|
|
|
]); |
63
|
|
|
$terms['A']->save(); |
64
|
|
|
|
65
|
|
|
$terms['B'] = Term::create([ |
66
|
|
|
'name' => 'Term B', |
67
|
|
|
'vid' => 'tags', |
68
|
|
|
]); |
69
|
|
|
$terms['B']->save(); |
70
|
|
|
|
71
|
|
|
$terms['C'] = Term::create([ |
72
|
|
|
'name' => 'Term C', |
73
|
|
|
'vid' => 'tags', |
74
|
|
|
]); |
75
|
|
|
$terms['C']->save(); |
76
|
|
|
|
77
|
|
|
foreach ($this->letters as $letter) { |
78
|
|
|
$this->createNode([ |
79
|
|
|
'title' => 'Node ' . $letter, |
80
|
|
|
'type' => 'test', |
81
|
|
|
'field_tags' => $terms[$letter], |
82
|
|
|
])->save(); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
} |
88
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths