Rx\Functional\Operator\CatchErrorTest::catchError_Error_Error_Dispose PHP Method

catchError_Error_Error_Dispose() public method

    public function catchError_Error_Error_Dispose()
    {
        $error = new \Exception();
        $o1 = $this->createHotObservable([onNext(150, 1), onNext(210, 2), onNext(220, 3), onError(230, $error)]);
        $o2 = $this->createHotObservable([onNext(240, 4), onError(250, $error)]);
        $results = $this->scheduler->startWithDispose(function () use($o1, $o2) {
            return $o1->catchError(function () use($o2) {
                return $o2;
            });
        }, 225);
        $this->assertMessages([onNext(210, 2), onNext(220, 3)], $results->getMessages());
    }