Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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 .+\\.$#"
Expand Down
9 changes: 8 additions & 1 deletion tests/src/Kernel/DataProducer/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,14 @@ public function testResolveEntityRendered(): void {

// @todo Add metadata check.
// $this->assertContains('node:1', $metadata->getCacheTags());
$this->assertStringContainsString('<a href="/node/1" rel="bookmark"><span>' . $this->node->getTitle() . '</span>', $result);
// Rendered output is slightly different in Drupal 8 vs. 9.
[$version] = explode('.', \Drupal::VERSION, 2);
if ($version == 8) {
$this->assertStringContainsString('<a href="/node/1" rel="bookmark"><span>' . $this->node->getTitle() . '</span>', $result);
}
else {
$this->assertMatchesRegularExpression('#<a href="/node/1" rel="bookmark">\s*<span>' . $this->node->getTitle() . '</span>#', $result);
}
}

}