function testIntegratedQueryUnique() { $numbers = new qinq\Collection([1, 1, 2, 2, 2, 4, 4, 4, 5, 5, 5]); $matches = [1, 2, 4, 5]; foreach ($numbers->unique() as $number) { $match = array_shift($matches); $this->assertEquals($match, $number); } }