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

catchError_Empty() public method

public catchError_Empty ( )
    public function catchError_Empty()
    {
        $o1 = $this->createHotObservable([onNext(150, 1), onCompleted(230)]);
        $o2 = $this->createHotObservable([onNext(240, 5), onCompleted(250)]);
        $results = $this->scheduler->startWithCreate(function () use($o1, $o2) {
            return $o1->catchError(function () use($o2) {
                return $o2;
            });
        });
        $this->assertMessages([onCompleted(230)], $results->getMessages());
    }