public function test_collect_concat_continue() { $arr = array(array(1, 2), array(3, 4)); $count = 0; Enumerator::collect_concat($arr, function ($key, &$value) use(&$count) { if ($value == 3) { throw new ContinueException(); } $count += $value; }); $this->assertEquals(7, $count); }