public function test_reverse_collect_continue() { $arr = array(1, 2, 3); $o = ''; Enumerator::reverse_collect($arr, function ($key, &$value) use(&$o) { if ($value == 2) { throw new ContinueException(); } $o .= $value . ', '; return; }); $this->assertEquals('3, 1, ', $o); }