Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing with global formatter #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rubentebogt
Copy link
Contributor

Hi Ben, as discussed in the previous PR 13, i hereby present a new PR to make testing use the global postcode formatter.

A few things to note:

  1. Because this is a proof of concept commit, for readability i only changed the BE formatter test. Others will follow later of course if necessary.
  2. This PR makes al the getFormatter functions in the tests and abstract test class obsolete but they have not yet been removed.
  3. This PR introduces the new getCountry function in the abstract test class using reflection because according to my research this is the easiest and fastest way. However i know that your not a fan of this which is why i am open to suggestions. It was also a fast way of showing you in this PR what i am trying to accomplish. Reflection does however reassure that the formatter has to bo named exactly in the same way as the test and if not, it will all fail.
  4. I again want to stretch that this ensures that the test actually tests the actual output and format a user will see when using the public API of this package. Especially when a stripe or space is part of the format and future changes may interfere.

@BenMorel Looking forward to your viewings on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant