function _after($count, $function) { return Underscore::after($count, $function); }
/** * @tags functions */ public function testAfter() { // it should trigger function exection after a couple of tries $called = false; $fn = _::after(3, function () use(&$called) { $called = true; }); // call the function 2 times $fn(); // nope $fn(); // still nope $this->boolean($called)->isFalse(); // call the function a 3rd time $fn(); // f**k yeah! $this->boolean($called)->isTrue(); }