Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated: Comment #0
Problem/Motivation
Config Translation's route subscriber is not unit tested.
Proposed resolution
Unit test it!
Remaining tasks
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#10 | 2139135-10.patch | 4.32 KB | YesCT |
#1 | 2139135-1.patch | 4.36 KB | tstoeckler |
Comments
Comment #1
tstoecklerYes, I want to translate my pets with Drupal. :-)
I included two doc fixes in the other unit test classes, please don't kill me.
Comment #3
tstoeckler1: 2139135-1.patch queued for re-testing.
Comment #4
tstoecklerStreamWrapperTest.php, line 95
Comment #6
tstoecklerJust had this very strange random fail in #1792310: Wrong DRUPAL_ROOT with non-standard code structure as well:
ImageFieldDisplayTest.php, line 229
ImageFieldDisplayTest.php, line 251
array_flip(): Can only flip STRING and INTEGER values!
in FieldableDatabaseStorageController.php, line 212
Comment #7
tstoeckler1: 2139135-1.patch queued for re-testing.
Comment #8
dawehnerJust in case you reroll that patch, let's actually describe which class we test
Some of those lines might disagree, in other words I would love to get rid of getInfo() for unit tests.
Should this code be moved to a dataProvider?
Comment #9
sunComment #10
YesCT CreditAttribution: YesCT commentedrerolled this to apply (auto 3-way merge)
but phpunit fails
-----------
./vendor/bin/phpunit --group Config_translation
PHPUnit 3.7.21 by Sebastian Bergmann.
Configuration read from /Users/ctheys/foo/drupal/core/phpunit.xml.dist
........................................................
Fatal error: Call to undefined method Drupal\config_translation\Routing\RouteSubscriber::routes() in /Users/ctheys/foo/drupal/core/modules/config_translation/tests/Drupal/config_translation/Tests/Routing/RouteSubscriberTest.php on line 95
Comment #11
YesCT CreditAttribution: YesCT commented#2145041: Allow dynamic routes to be defined via a callback
Comment #12
YesCT CreditAttribution: YesCT commentedComment #14
sunThe issue tag is for issues to fix random test failures, not for affected issues.
#2262085: Random test failure in Drupal\image\Tests\ImageFieldDisplayTest
If you encounter a random test failure, please create a dedicated bug report for the random test failure + tag it + copy the testbot assertion failures into its issue summary.
Comment #15
tstoeckler