Rx\Functional\Operator\MinTest::min_comparer_throws PHP Method

min_comparer_throws() public method

public min_comparer_throws ( )
    public function min_comparer_throws()
    {
        $error = new \Exception();
        $xs = $this->createHotObservable([onNext(150, 'z'), onNext(210, 'b'), onNext(220, 'c'), onNext(230, 'a'), onCompleted(250)]);
        $results = $this->scheduler->startWithCreate(function () use($xs, $error) {
            return $xs->min(function () use($error) {
                throw $error;
            });
        });
        $this->assertMessages([onError(220, $error)], $results->getMessages());
    }