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

IdnaEncoderTest: improve tests #549

Merged
merged 6 commits into from
Oct 18, 2021
Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 17, 2021

IdnaEncoderTest: refactor encoding tests

  • Merge five tests doing the exact same thing, into one test using a data provider with named data sets and keyed data entries.
  • Remove static keyword from data provider.
  • Add docblock documentation to the test and the data provider.

IdnaEncoderTest: add additional valid encoding tests

This commit adds:

  • An empty text string test case.
  • A stringable object test case.
  • All other examples listed in the RFC as test cases.

IdnaEncoderTest: refactor invalid encoding tests

  • Merge five tests doing the exact same thing, into one test using a data provider with named data sets.
  • Add docblock documentation to the test and the data provider.

IdnaEncoderTest: minor spacing tweaks

.... to improve readability.

IdnaEncoderTest: add @Covers tags

IdnaEncoder::to_ascii(): add select @codeCoverageIgnore annotation

Related to #497

@jrfnl jrfnl added this to the 2.0.0 milestone Sep 17, 2021
@jrfnl jrfnl marked this pull request as draft September 17, 2021 12:20
@jrfnl
Copy link
Member Author

jrfnl commented Sep 17, 2021

Reverted to draft as this PR needs PR #547 to be merged first.

@jrfnl jrfnl force-pushed the feature/idnaencoder-improve-tests branch from fe68365 to 5145c8a Compare September 17, 2021 12:21
src/IdnaEncoder.php Show resolved Hide resolved
* Merge five tests doing the exact same thing, into one test using a data provider with named data sets and keyed data entries.
* Remove `static` keyword from data provider.
* Add docblock documentation to the test and the data provider.
This commit adds:
* An empty text string test case.
* A stringable object test case.
* All other examples listed in the RFC as test cases.
* Merge five tests doing the exact same thing, into one test using a data provider with named data sets.
* Add docblock documentation to the test and the data provider.
.... to improve readability.
@jrfnl jrfnl force-pushed the feature/idnaencoder-improve-tests branch from 5145c8a to 4f76f5b Compare October 11, 2021 15:44
@jrfnl jrfnl marked this pull request as ready for review October 11, 2021 15:44
@jrfnl
Copy link
Member Author

jrfnl commented Oct 11, 2021

Marking this as ready for review now PR #547 has been merged.

@schlessera schlessera merged commit 2d78a4d into develop Oct 18, 2021
@schlessera schlessera deleted the feature/idnaencoder-improve-tests branch October 18, 2021 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants