Skip to content

Commit 9430021

Browse files
authored
tests(Travis CI): Switch testing to Drupal 8.9.x and 9.0.x (#1081)
1 parent a32c1bc commit 9430021

4 files changed

Lines changed: 19 additions & 8 deletions

File tree

.travis.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,25 @@ env:
1616
- SIMPLETEST_DB=mysql://root:@127.0.0.1/graphql
1717
- TRAVIS=true
1818
matrix:
19-
- DRUPAL_CORE=8.8.x
19+
- DRUPAL_CORE=8.9.x
2020

2121
matrix:
2222
# Don't wait for the allowed failures to build.
2323
fast_finish: true
2424
include:
25-
- php: 7.2
25+
- php: 7.4
2626
env:
27-
- DRUPAL_CORE=8.8.x
27+
- DRUPAL_CORE=8.9.x
2828
# Only run code coverage on the latest php and drupal versions.
2929
- WITH_PHPDBG_COVERAGE=true
30+
- php: 7.4
31+
env:
32+
- DRUPAL_CORE=9.0.x
3033
allow_failures:
3134
# Allow the code coverage report to fail.
32-
- php: 7.2
35+
- php: 7.4
3336
env:
34-
- DRUPAL_CORE=8.8.x
37+
- DRUPAL_CORE=8.9.x
3538
# Only run code coverage on the latest php and drupal versions.
3639
- WITH_PHPDBG_COVERAGE=true
3740

@@ -113,7 +116,7 @@ script:
113116
- if [[ "$WITH_PHPDBG_COVERAGE" != "true" ]];
114117
then $DRUPAL_BUILD_DIR/vendor/bin/phpunit --configuration $DRUPAL_BUILD_DIR/core/phpunit.xml $TRAVIS_BUILD_DIR;
115118
fi
116-
119+
117120
# Run Phpstan
118121
- cd $DRUPAL_BUILD_DIR/modules/graphql && $DRUPAL_BUILD_DIR/vendor/bin/phpstan analyse
119122

phpstan.neon

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ parameters:
77
customRulesetUsed: true
88
paths:
99
- .
10+
# We test with PHPStan on Drupal 8 and 9 and might have different ignored
11+
# errors on both.
12+
reportUnmatchedIgnoredErrors: false
1013
ignoreErrors:
1114
# @todo Ignore phpstan-drupal extension's rules for now, activate later.
1215
- '#\Drupal calls should be avoided in classes, use dependency injection instead#'
@@ -15,3 +18,8 @@ parameters:
1518
# Drupal allows object property access to custom fields, so we cannot fix
1619
# that.
1720
- "#^Access to an undefined property Drupal\\\\#"
21+
# PHPUnit deprecation warnings in Drupal 9 that we don't care about.
22+
- "#^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder:#"
23+
# Symfony 4 deprecations in Drupal 9 that we don't care about.
24+
- "#deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event#"
25+
- "#deprecated class Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\GetResponseEvent#"

tests/modules/graphql_persisted_queries_test/graphql_persisted_queries_test.info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ type: module
22
name: GraphQL Persisted Queries Test
33
description: Tests the graphql persisted queries functionality.
44
package: Testing
5-
core: 8.x
5+
core_version_requirement: ^8 || ^9
66
hidden: TRUE
77
dependencies:
88
- graphql:graphql

tests/src/Kernel/DataProducer/EntityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ public function testResolveEntityRendered() {
377377

378378
// TODO: Add metadata check.
379379
// $this->assertContains('node:1', $metadata->getCacheTags());
380-
$this->assertContains('<a href="/node/1" rel="bookmark"><span>' . $this->node->getTitle() . '</span>', $result);
380+
$this->assertStringContainsString('<a href="/node/1" rel="bookmark"><span>' . $this->node->getTitle() . '</span>', $result);
381381
}
382382

383383
}

0 commit comments

Comments
 (0)