diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index fde304ce0..2fc26c793 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: php-versions: ['7.3', '7.4', '8.0'] - drupal-core: ['9.2.x'] + drupal-core: ['9.3.x'] include: # Extra run to also test on latest Drupal 8 and PHP 7.2. - php-versions: '7.2' diff --git a/phpstan.neon b/phpstan.neon index cbc801c99..0ec078957 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -46,6 +46,13 @@ parameters: - """ #^Call to deprecated function file_munge_filename\\(\\)# """ + - """ + #^Call to deprecated function drupal_get_path\\(\\)# + """ + - """ + #^Call to deprecated function file_create_url\\(\\)# + """ + - "#^Call to an undefined method Drupal\\\\Tests\\\\graphql\\\\Kernel\\\\DataProducer\\\\EntityTest\\:\\:assertMatchesRegularExpression\\(\\)\\.$#" # Drupal allows object property access to custom fields, so we cannot fix # that. - "#^Property Drupal\\\\.+ \\(Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\) does not accept .+\\.$#" diff --git a/tests/src/Kernel/DataProducer/EntityTest.php b/tests/src/Kernel/DataProducer/EntityTest.php index 85447fd73..f80fe1ab3 100644 --- a/tests/src/Kernel/DataProducer/EntityTest.php +++ b/tests/src/Kernel/DataProducer/EntityTest.php @@ -377,7 +377,14 @@ public function testResolveEntityRendered(): void { // @todo Add metadata check. // $this->assertContains('node:1', $metadata->getCacheTags()); - $this->assertStringContainsString('' . $this->node->getTitle() . '', $result); + // Rendered output is slightly different in Drupal 8 vs. 9. + [$version] = explode('.', \Drupal::VERSION, 2); + if ($version == 8) { + $this->assertStringContainsString('' . $this->node->getTitle() . '', $result); + } + else { + $this->assertMatchesRegularExpression('#\s*' . $this->node->getTitle() . '#', $result); + } } }