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.
We're not using the library formatter, so we can't rely on the library test coverage.
This is the test coverage we want to transfer into the Drupal test:
https://github.com/commerceguys/addressing/blob/master/tests/Formatter/D...
The test should live in src/Tests/Formatter and extend KernelTestBase, just like the core formatter tests.
Comment | File | Size | Author |
---|---|---|---|
#4 | write_tests_for_the-2525766-3.patch | 8.02 KB | googletorp |
#2 | 2525766-2-formatter-tests.patch | 4.82 KB | bojanz |
#1 | DefaultFormatterTest.php_.gz | 2.63 KB | dbolinovski |
Comments
Comment #1
dbolinovski CreditAttribution: dbolinovski commentedComment #2
bojanz CreditAttribution: bojanz at Centarro commentedHere's a patch that passes. It only has the El Salvador asserts. Now the other asserts from the library test (linked in the OP) need to be ported over as well.
Remember to expand the $countryCodes array for each new country.
testUnitedStatesIncompleteAddress will be easy to port, testTaiwanAddress will require importing the "zh-hant" translation for the TW address format in setUp().
Comment #3
googletorp CreditAttribution: googletorp as a volunteer commentedComment #4
googletorp CreditAttribution: googletorp as a volunteer commentedI'm having some issues to figure out how to use the imported translation for the address format.
Uploaded the improve patch, also got it in my github fork.
Comment #5
bojanz CreditAttribution: bojanz at Centarro commentedCommitted.