Skip to content

Commit f628407

Browse files
author
Luis
committed
Testing: Add compatibility to drupal 10
1 parent 7efdf50 commit f628407

21 files changed

Lines changed: 41 additions & 37 deletions

modules/graphql_core/tests/src/Kernel/Breadcrumbs/BreadcrumbsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class BreadcrumbsTest extends GraphQLCoreTestBase {
2525
/**
2626
* {@inheritdoc}
2727
*/
28-
protected function setUp() {
28+
protected function setUp(): void {
2929
parent::setUp();
3030

3131
$breadcrumbManager = $this->prophesize('Drupal\Core\Breadcrumb\BreadcrumbManager');

modules/graphql_core/tests/src/Kernel/Entity/BundleLessEntityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class BundleLessEntityTest extends GraphQLContentTestBase {
1818
/**
1919
* {@inheritdoc}
2020
*/
21-
protected function setUp() {
21+
protected function setUp(): void {
2222
parent::setUp();
2323
FieldStorageConfig::create([
2424
'field_name' => 'field_test',

modules/graphql_core/tests/src/Kernel/Entity/EntityByIdTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class EntityByIdTest extends GraphQLContentTestBase {
2828
/**
2929
* {@inheritdoc}
3030
*/
31-
protected function setUp() {
31+
protected function setUp(): void {
3232
parent::setUp();
3333

3434
/** @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface $languageStorage */

modules/graphql_core/tests/src/Kernel/Entity/EntityFieldValueTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class EntityFieldValueTest extends GraphQLContentTestBase {
3535
/**
3636
* {@inheritdoc}
3737
*/
38-
protected function setUp() {
38+
protected function setUp(): void {
3939
parent::setUp();
4040
}
4141

modules/graphql_core/tests/src/Kernel/EntityMutation/EntityMutationTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function userPermissions() {
3030
/**
3131
* {@inheritdoc}
3232
*/
33-
protected function setUp() {
33+
protected function setUp(): void {
3434
parent::setUp();
3535
$this->mockInputType('node_input', [
3636
'name' => 'NodeInput',
@@ -41,6 +41,9 @@ protected function setUp() {
4141
]);
4242
}
4343

44+
/**
45+
*
46+
*/
4447
protected function mockMutationFactory($definition, $result = NULL, $builder = NULL) {
4548
$mutation = $this->getMockBuilder([
4649
'createNode' => CreateEntityBase::class,

modules/graphql_core/tests/src/Kernel/EntityQuery/EntityQueryTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class EntityQueryTest extends GraphQLContentTestBase {
1515
/**
1616
* {@inheritdoc}
1717
*/
18-
protected function setUp() {
18+
protected function setUp(): void {
1919
parent::setUp();
2020
$this->createContentType(['type' => 'a']);
2121
$this->createContentType(['type' => 'b']);
@@ -50,7 +50,7 @@ public function testEntityQuery() {
5050
$c->save();
5151
$d->save();
5252

53-
// TODO: Check cache metadata.
53+
// @todo Check cache metadata.
5454
$metadata = $this->defaultCacheMetaData();
5555
$metadata->addCacheContexts(['user.node_grants:view']);
5656
$metadata->addCacheTags([
@@ -122,11 +122,11 @@ public function testFilterSecurity() {
122122
$metadata->addCacheTags(['graphql', 'user_list']);
123123
$this->assertResults('query { userQuery (filter: { conditions: [ { field: "pass", value: "foo" } ] }) { count } }', [], [
124124
'userQuery' => [
125-
// TODO: With proper access checking for filters this value should
126-
// become "2" and the entity query field can be marked as secure
125+
// @todo With proper access checking for filters this value should
126+
// become "2" and the entity query field can be marked as secure
127127
// again.
128128
'count' => 0,
129-
]
129+
],
130130
], $metadata);
131131
}
132132

modules/graphql_core/tests/src/Kernel/GraphQLContentTestBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function userPermissions() {
4545
/**
4646
* {@inheritdoc}
4747
*/
48-
protected function setUp() {
48+
protected function setUp(): void {
4949
parent::setUp();
5050

5151
$this->installConfig(['node', 'filter', 'text']);

modules/graphql_core/tests/src/Kernel/GraphQLCoreTestBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class GraphQLCoreTestBase extends GraphQLTestBase {
2121
/**
2222
* {@inheritdoc}
2323
*/
24-
protected function setUp() {
24+
protected function setUp(): void {
2525
parent::setUp();
2626
// User entity schema is required for the currentUserContext field.
2727
$this->installEntitySchema('user');

modules/graphql_core/tests/src/Kernel/Images/ImageFieldTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ImageFieldTest extends GraphQLContentTestBase {
2323
/**
2424
* {@inheritdoc}
2525
*/
26-
protected function setUp() {
26+
protected function setUp(): void {
2727
parent::setUp();
2828
$this->installConfig('image');
2929
$this->installSchema('file', 'file_usage');
@@ -44,7 +44,6 @@ public function testImageField() {
4444

4545
$a->save();
4646

47-
4847
$style = ImageStyle::load('thumbnail');
4948

5049
$dimensions = [
@@ -58,7 +57,7 @@ public function testImageField() {
5857
$metadata->addCacheTags([
5958
'file:1',
6059
'node:1',
61-
// TODO: Check metatags. Is the config metatag required?
60+
// @todo Check metatags. Is the config metatag required?
6261
'config:image.style.thumbnail',
6362
]);
6463

@@ -78,7 +77,8 @@ public function testImageField() {
7877
'width' => $dimensions['width'],
7978
'height' => $dimensions['height'],
8079
],
81-
]],
80+
],
81+
],
8282
],
8383
],
8484
], $metadata);

modules/graphql_core/tests/src/Kernel/Languages/LanguageTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class LanguageTest extends GraphQLCoreTestBase {
2222
/**
2323
* {@inheritdoc}
2424
*/
25-
protected function setUp() {
25+
protected function setUp(): void {
2626
parent::setUp();
2727

2828
$this->installConfig(['language']);
@@ -51,8 +51,7 @@ protected function setUp() {
5151
*/
5252
public function testLanguageId() {
5353
$metadata = $this->defaultCacheMetaData();
54-
// TODO: Should this also contain the language config cache metadata?
55-
54+
// @todo Should this also contain the language config cache metadata?
5655
$this->assertResults($this->getQueryFromFile('languages.gql'), [], [
5756
'languages' => [
5857
0 => [
@@ -104,7 +103,7 @@ public function testLanguageSwitchLinks() {
104103
'config:language.entity.en',
105104
'config:language.entity.es',
106105
'config:language.entity.fr',
107-
'config:language.entity.pt-br'
106+
'config:language.entity.pt-br',
108107
]);
109108

110109
$this->assertResults($this->getQueryFromFile('language_switch_links.gql'), [], [
@@ -154,4 +153,5 @@ public function testLanguageSwitchLinks() {
154153
],
155154
], $metadata);
156155
}
156+
157157
}

0 commit comments

Comments
 (0)