Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Refactor formatters with Luhn validation, and add a dedicated calculator service #414

Merged
merged 6 commits into from
Sep 2, 2014

Conversation

fzaninotto
Copy link
Owner

  • Create util Luhn class
  • Update providers to use this class to create luhn-compliant numbers
  • Update tests to remove custom luhn validations

Refs #403

@fzaninotto fzaninotto changed the title [WIP] Add Luhn validation Refactor formatters with Luhn validation, and add a dedicated calculator service Sep 2, 2014
fzaninotto added a commit that referenced this pull request Sep 2, 2014
Refactor formatters with Luhn validation, and add a dedicated calculator service
@fzaninotto fzaninotto merged commit 765fc22 into master Sep 2, 2014
@fzaninotto fzaninotto deleted the luhn branch September 2, 2014 20:59
@fzaninotto fzaninotto mentioned this pull request Sep 2, 2014
}

public function testUsesEvenValuesForFemales()
public function testPersonalIdentityNumberGeneratesEvenValuesForMales()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function names have been mixed up here. The test should be named testPersonalIdentityNumberGeneratesOddValuesForMales(), and vice versa with the test for females further down.
The functions themselves are correct though.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4c3e635

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

Successfully merging this pull request may close these issues.

2 participants