-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Added Holiday Provider for Brazil #21
Conversation
Thank you @dorianneto ! Very nice, however it has some conflicts with the current branch. Can you check again? |
Checked and validated :) I'm sorry for a lot of commits. I forgot to use the |
@dorianneto Not sure what you mean, though :) I still need to check your PR; planning this for the 1.4 version. Once I have finished 1.3 I will merge it into the master branch. In case you need it earlier, you can still use your own fork. |
* Timezone in which this provider has holidays defined | ||
*/ | ||
const TIMEZONE = 'America/Fortaleza'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a constant for the common locale in Brazil. See for example the other test classes ( const LOCALE = 'nl_NL';
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
All done :) |
Thanks @dorianneto ! Looking good. Let me review once more and merge it soon. |
Just ran another unittest and found some errors:
If a holidays is of a certain type (e.g. National), make sure they are added in the respective test of the BrazilTest class. Running a single iteration of PHPUnit might not detect all issues. Please run with --repeat 10 for example. You might see more issues appearing. |
'goodFriday', | ||
'easter', | ||
'diaDeTiradentes', | ||
'tiradentesDay', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The holiday is in the correct array.
Before push this commit, I verified all unittests and not found no problem. Now, I ran with --repeat 10 and sometimes have a problem sometimes not. This is a PHPUnit bug or I have to do anything? I never experienced this problem, sorry :( |
The reason for that is, that the unit tests use a randomized year. It might be possible that for that particular year the respective holiday doesn't exist. Usually this becomes apparent when running multiple iterations :). Nothing to worry about. Let me merge it and fix it for you. |
No description provided.