Fix failing test since Drupal 10.1.x

Created on 10 May 2023, over 1 year ago
Updated 27 May 2023, over 1 year ago

Problem/Motivation

Running the tests in any issue fork leads to a test error, while the (old) test status on the project page is still green.

Created 9 May 2023 at 16:25 CEST. 679eab97922f51b95e975a1accaf2b99f3c2729c pushed to 3356155-update-twig-twig-minimum merge request. Updated 9 May 2023 at 16:27 CEST.

10 pass, 1 fail - View results on dispatcher
Show: Failing classes All
		
✓	✗	
10	1	Twig_tweak.Twig_tweak
	1	Twig_tweak.Drupal\Tests\twig_tweak\Kernel\EntityViewBuilderTest
	✗	
Drupal\Tests\twig_tweak\Kernel\EntityViewBuilderTest

fail: [Other] Line 0 of sites/default/files/simpletest/phpunit-7.xml:
PHPUnit Test failed to complete; Error: PHPUnit 9.6.7 by Sebastian Bergmann and contributors.

Testing Drupal\Tests\twig_tweak\Kernel\EntityViewBuilderTest
F                                                                   1 / 1 (100%)

Time: 00:00.883, Memory: 4.00 MB

There was 1 failure:

1) Drupal\Tests\twig_tweak\Kernel\EntityViewBuilderTest::testEntityViewBuilder
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'Public node'
+'Public node'

/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79
/var/www/html/modules/contrib/twig_tweak/tests/src/Kernel/EntityViewBuilderTest.php:95
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

FAILURES!
Tests: 1, Assertions: 16, Failures: 1.

Locally all tests pass, so it might be an issue with Drupal CI or Issue forks?

Steps to reproduce

Create an issue (like this) with no relevant changes and see the test fail

Proposed resolution

Rerun tests at https://www.drupal.org/node/2643614/qa to check if this also fails
Fix the test (unclear what's wrong)

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: outdated

Version

3.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024