Rx\Functional\Operator\StartWithTest::startWith_error PHP Method

startWith_error() public method

public startWith_error ( )
    public function startWith_error()
    {
        $error = new \Exception();
        $xs = $this->createHotObservable([onNext(150, 1), onError(250, $error)]);
        $results = $this->scheduler->startWithCreate(function () use($xs) {
            return $xs->startWithArray([1, 2, 3]);
        });
        $this->assertMessages([onNext(201, 1), onNext(202, 2), onNext(203, 3), onError(250, $error)], $results->getMessages());
    }