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

catchError_Error_Never() public method

    public function catchError_Error_Never()
    {
        $error = new \Exception();
        $o1 = $this->createHotObservable([onNext(150, 1), onNext(210, 2), onNext(220, 3), onError(230, $error)]);
        $o2 = Observable::never();
        $results = $this->scheduler->startWithCreate(function () use($o1, $o2) {
            return $o1->catchError(function () use($o2) {
                return $o2;
            });
        });
        $this->assertMessages([onNext(210, 2), onNext(220, 3)], $results->getMessages());
    }