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

catchError_Error_Error() public method

    public function catchError_Error_Error()
    {
        $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->startWithCreate(function () use($o1, $o2) {
            return $o1->catchError(function () use($o2) {
                return $o2;
            });
        });
        $this->assertMessages([onNext(210, 2), onNext(220, 3), onNext(240, 4), onError(250, $error)], $results->getMessages());
    }