Rx\Functional\Operator\ReduceTest::reduce_without_seed_throw PHP Method

reduce_without_seed_throw() public method

    public function reduce_without_seed_throw()
    {
        $ex = new \Exception('ex');
        $xs = $this->createHotObservable([onNext(150, 1), onError(210, $ex)]);
        $results = $this->scheduler->startWithCreate(function () use($xs) {
            return $xs->reduce(function ($acc, $x) {
                return $acc + $x;
            });
        });
        $this->assertMessages([onError(210, $ex)], $results->getMessages());
    }