RxPHP
RxPHP copied to clipboard
[WIP] Higher-Order Marble tests
I cherry picked the higher-order test code from v1 so we can start working on getting higher-order marble tests working.
Some tests are failing.
@martinsik if you get a chance, can you look at the failing tests?
@davidwdan Can you give me write permissions to your marbleTest
branch?
@martinsik you have permission now. I think the issue is that in some circumstances there are multiple test schedulers. If I hack it and pass the test scheduler through the onNext
helper function, it works.
Coverage decreased (-0.09%) to 99.908% when pulling 08b0e0af9fc35ee972cc78ce18da23e80fe4be73 on davidwdan:marbleTest into 23e32cafd8d90a4c6d0df5e67172eff2e464571c on ReactiveX:2.x.
Inner observables are now materialized when being converted to a string. This simplifies things and gets rid of the need to check the instance of the observers.
The test automatic_mock_observer_doesnt_create_loggable_subscription
is failing, but I not sure if it's still needed or when those inner subscriptions should start and stop.
Coverage remained the same at 100.0% when pulling ee4ec612fd087ed032361774db3ba3cffc650dcb on davidwdan:marbleTest into 23e32cafd8d90a4c6d0df5e67172eff2e464571c on ReactiveX:2.x.
@davidwdan That test is irrelevant because now the MockObserver
automatically subscribes only when calling OnNextNotification:: __toString()
.
It was previously used in situations where we don't want to log subscriptions. For example in tests such as MergeAllTest.php#L14 where it's not a problem anymore because there are no __toString()
calls on $xs
or $ys
.
I added a groupBy
marble test that is currently failing. We may have to change where the inner observable is materialized