malkusch\lock\util\LoopTest::testEnd PHP Method

testEnd() public method

Tests end() will stop the iteration and return the result.
public testEnd ( )
    public function testEnd()
    {
        $i = 0;
        $loop = new Loop();
        $loop->execute(function () use($loop, &$i) {
            $i++;
            $loop->end();
        });
        $this->assertEquals(1, $i);
    }