Rx\Functional\Operator\DistinctTest::distinct_CustomComparer_some_duplicates PHP Метод

distinct_CustomComparer_some_duplicates() публичный Метод

    public function distinct_CustomComparer_some_duplicates()
    {
        $xs = $this->createHotObservable([onNext(280, 4), onNext(300, 2), onNext(350, 12), onNext(380, 3), onNext(400, 24), onCompleted(420)]);
        $results = $this->scheduler->startWithCreate(function () use($xs) {
            return $xs->distinct(call_user_func([$this, "modComparer"], 10));
        });
        $this->assertMessages([onNext(280, 4), onNext(300, 2), onNext(380, 3), onCompleted(420)], $results->getMessages());
        $this->assertSubscriptions([subscribe(200, 420)], $xs->getSubscriptions());
    }