Problem/Motivation
This test uses a provider which is inherently slow for functional tests because each invocation installs Drupal. We can just use a foreach.
Numbers from my local machine/ddev:
Before:
../vendor/bin/phpunit modules/telephone/tests/src/Functional/TelephoneFieldTest.php
PHPUnit 10.5.26 by Sebastian Bergmann and contributors.
Runtime: PHP 8.3.8
Configuration: /var/www/html/core/phpunit.xml
............ 12 / 12 (100%)
Time: 01:46.429, Memory: 4.00 MB
OK (12 tests, 121 assertions)
After:
../vendor/bin/phpunit modules/telephone/tests/src/Functional/TelephoneFieldTest.php
PHPUnit 10.5.26 by Sebastian Bergmann and contributors.
Runtime: PHP 8.3.8
Configuration: /var/www/html/core/phpunit.xml
.. 2 / 2 (100%)
Time: 00:19.843, Memory: 4.00 MB
OK (2 tests, 41 assertions)
1m46s down to 19s
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #2
catchComment #4
ankitv18 commentedIf thats the case then I would suggest to directly include array list within the testTelephoneFormatter function?
Any thoughts? @catch
Comment #5
ankitv18 commentedComment #6
catchThat makes sense - did the minimal code change to make sure it didn't introduce any failures, but now it doesn't, we can remove the extra method.
Comment #7
ankitv18 commentedThanks @catch
Looks perfect after the refractor, pipelines are all executed properly ~~ hence marking this one RTBC.
Comment #13
nod_Committed and pushed c0e94e3446 to 11.x and 87b8c59a49 to 11.0.x and 9e73b2b33f to 10.4.x and 2328738ae7 to 10.3.x. Thanks!