Rx\Functional\Operator\ConcatTest::testConcatAll PHP Method

testConcatAll() public method

public testConcatAll ( )
    public function testConcatAll()
    {
        $sources = Observable::fromArray([Observable::just(0), Observable::just(1), Observable::just(2), Observable::just(3)]);
        $res = [];
        $completed = false;
        $sources->concatAll()->subscribeCallback(function ($x) use(&$res) {
            $res[] = $x;
        }, function ($e) {
            $this->fail();
        }, function () use(&$completed) {
            $completed = true;
        });
        $this->assertEquals([0, 1, 2, 3], $res);
        $this->assertTrue($completed);
    }