Rx\Functional\Operator\SelectTest::mapTo_value PHP Method

mapTo_value() public method

public mapTo_value ( )
    public function mapTo_value()
    {
        $xs = $this->createHotObservable([onNext(150, 1), onNext(210, 2), onNext(220, 3), onNext(230, 4), onNext(240, 5), onCompleted(250)]);
        $results = $this->scheduler->startWithCreate(function () use($xs) {
            return $xs->mapTo(-1);
        });
        $this->assertMessages([onNext(210, -1), onNext(220, -1), onNext(230, -1), onNext(240, -1), onCompleted(250)], $results->getMessages());
    }