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

Add test for issue #196 #211

Merged
merged 8 commits into from
Mar 28, 2019
Merged

Conversation

hubermat
Copy link
Contributor

This PR adds a unit test for issue #196, proving that everything is all right.

It should be applied after PR #209 and PR #210, otherwise the unit tests will all fail.

tests/RecurrencesTest.php Outdated Show resolved Hide resolved
tests/RecurrencesTest.php Outdated Show resolved Hide resolved
tests/SingleEventsTest.php Outdated Show resolved Hide resolved
tests/SingleEventsTest.php Outdated Show resolved Hide resolved
tests/icalmonthly.txt Outdated Show resolved Hide resolved
tests/issue196.txt Outdated Show resolved Hide resolved
@u01jmg3
Copy link
Owner

u01jmg3 commented Mar 23, 2019

ℹ️ Commenting on this PR as it is an accumulation of #209 and #210.


When I run composer test I am getting the following errors and failures:

There were 11 errors:

1) RecurrencesTest::testYearlyFullDayTimeZoneBerlin
PHPUnit_Framework_Exception:

Caused by exception 'ErrorException' with message 'unserialize(): Error at offset 0 of 4546 bytes' in C:\ics-parser\vendor\phpunit\phpunit\src\Util\PHP.php:114

And

There were 4 failures:

1) Churchtools\Tests\ICal\SingleEventsTest::testFullDayTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 1.

C:\ics-parser\tests\SingleEventsTest.php:75
C:\ics-parser\tests\SingleEventsTest.php:20

2) Churchtools\Tests\ICal\SingleEventsTest::testSeveralFullDaysTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 1.

C:\ics-parser\tests\SingleEventsTest.php:75
C:\ics-parser\tests\SingleEventsTest.php:32

3) Churchtools\Tests\ICal\SingleEventsTest::testEventTimeZoneUTC
Failed asserting that actual size 0 matches expected size 1.

C:\ics-parser\tests\SingleEventsTest.php:75
C:\ics-parser\tests\SingleEventsTest.php:45

4) Churchtools\Tests\ICal\SingleEventsTest::testEventTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 1.

@hubermat
Copy link
Contributor Author

The errors and failures that you saw came from the annotation @runInSeparateProcess. This is a known issue under Windows. I simply removed the annotation, as there is no need to run the tests in separate processes. It runs even faster without! :-)

@u01jmg3
Copy link
Owner

u01jmg3 commented Mar 26, 2019

Thanks for making all these fixes - I appreciate your time.

I am still not seeing green though?

There were 13 failures:

1) RecurrencesTest::testYearlyFullDayTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 3.

C:\ics-parser\tests\RecurrencesTest.php:206
C:\ics-parser\tests\RecurrencesTest.php:32

2) RecurrencesTest::testMonthlyFullDayTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 3.

C:\ics-parser\tests\RecurrencesTest.php:206
C:\ics-parser\tests\RecurrencesTest.php:47

3) RecurrencesTest::testMonthlyFullDayTimeZoneBerlinSummerTime
Failed asserting that actual size 0 matches expected size 3.

C:\ics-parser\tests\RecurrencesTest.php:206
C:\ics-parser\tests\RecurrencesTest.php:62

4) RecurrencesTest::testWeeklyFullDayTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 6.

C:\ics-parser\tests\RecurrencesTest.php:206
C:\ics-parser\tests\RecurrencesTest.php:109

5) RecurrencesTest::testDailyFullDayTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 31.

C:\ics-parser\tests\RecurrencesTest.php:206
C:\ics-parser\tests\RecurrencesTest.php:124

6) RecurrencesTest::testWeeklyFullDayTimeZoneBerlinLocal
Failed asserting that actual size 0 matches expected size 6.

C:\ics-parser\tests\RecurrencesTest.php:206
C:\ics-parser\tests\RecurrencesTest.php:142

7) RecurrencesTest::testRFCDaily10NewYork
Failed asserting that actual size 0 matches expected size 10.

C:\ics-parser\tests\RecurrencesTest.php:206
C:\ics-parser\tests\RecurrencesTest.php:158

8) RecurrencesTest::testRFCDaily10Berlin
Failed asserting that actual size 0 matches expected size 10.

C:\ics-parser\tests\RecurrencesTest.php:206
C:\ics-parser\tests\RecurrencesTest.php:174

9) RecurrencesTest::testRFCDaily10BerlinFromNewYork
Failed asserting that actual size 0 matches expected size 10.

C:\ics-parser\tests\RecurrencesTest.php:206
C:\ics-parser\tests\RecurrencesTest.php:190

10) SingleEventsTest::testFullDayTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 1.

C:\ics-parser\tests\SingleEventsTest.php:83
C:\ics-parser\tests\SingleEventsTest.php:28

11) SingleEventsTest::testSeveralFullDaysTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 1.

C:\ics-parser\tests\SingleEventsTest.php:83
C:\ics-parser\tests\SingleEventsTest.php:40

12) SingleEventsTest::testEventTimeZoneUTC
Failed asserting that actual size 0 matches expected size 1.

C:\ics-parser\tests\SingleEventsTest.php:83
C:\ics-parser\tests\SingleEventsTest.php:53

13) SingleEventsTest::testEventTimeZoneBerlin
Failed asserting that actual size 0 matches expected size 1.

C:\ics-parser\tests\SingleEventsTest.php:83
C:\ics-parser\tests\SingleEventsTest.php:66

FAILURES!
Tests: 15, Assertions: 33, Failures: 13.
Script phpunit --colors=always handling the test event returned with error code 1

@u01jmg3
Copy link
Owner

u01jmg3 commented Mar 28, 2019

There were various issues related to line endings and unfold() not being able to expand the iCal strings in your tests. Will fix on my end to get these PRs merged.

@u01jmg3 u01jmg3 merged commit d4a1c36 into u01jmg3:master Mar 28, 2019
@u01jmg3 u01jmg3 added this to the v2.x.x milestone Mar 28, 2019
u01jmg3 added a commit that referenced this pull request Mar 28, 2019
Update options to define all possible values
Only use double quotes when necessary
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