azuyalabs / yasumi

The easy PHP Library for calculating holidays
https://www.yasumi.dev
Other
1.05k stars 155 forks source link

assertNotHoliday() skips rest of test #105

Closed c960657 closed 6 years ago

c960657 commented 6 years ago

If you add assertNotHoliday() to a test function, the rest of the test is skipped, because it intentionally throws an exception. This is rather surprising/confusing.

stelgenhof commented 6 years ago

Thanks for catching this. As a matter of fact, the assertFalse (line 133) shouldn't have been there. The objective of this function is to assert that a holiday doesn't exist. In such a case always 'null' is returned, therefore making this assertion irrelevant.