Rx\Functional\Operator\DelayTest::delay_completes_during_subscribe_without_throwing PHP Method

delay_completes_during_subscribe_without_throwing() public method

    public function delay_completes_during_subscribe_without_throwing()
    {
        $completes = false;
        Observable::create(function ($observer, $scheduler) {
            $observer->onCompleted();
        })->delay(1, $this->scheduler)->subscribeCallback(null, null, function () use(&$completes) {
            $completes = true;
        });
        $this->scheduler->start();
        $this->assertTrue($completes);
    }