single test that may reveal a few things#2
Open
jarektkaczyk wants to merge 2 commits into
Open
Conversation
vthaing
reviewed
May 30, 2020
| [$loan1, '2020-07-15'], | ||
| [$loan2, '2020-09-30'], | ||
|
|
||
| // judging by the name WeeklyRepayment, probably this should be the implementation: |
Owner
There was a problem hiding this comment.
The meaning of WeeklyRepayment->getEndDate is Get the date that loan will be end.. It doesn't mean: Get the date of next repayment date.
I think we don't need to implement your commented code.
BTW: Sorry for confusing. I should name WeeklyRepayment->getEndDate as WeeklyRepayment->getEndDateOfLoan. It's more clear. :D
vthaing
reviewed
May 30, 2020
| return [ | ||
| // judging by the code, this should be passing: | ||
| [$loan1, '2020-07-15'], | ||
| [$loan2, '2020-09-30'], |
Owner
There was a problem hiding this comment.
- I used pure PHP function in this case and I trusted in it
- Pure PHP doesn't cover the case: the date is at the end of the month and the total days of some months are different.
--> I will modify the code and cover above case
Owner
Hi @jarektkaczyk, Thank you for your PR.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tests are not optional