reenable() public method

public reenable ( )
Example #1
0
File: TaskTest.php Project: chh/bob
 function testInvokeRunsActionsOnlyOnce()
 {
     $invoked = 0;
     $t = new Task('foo', new Application());
     $t->actions[] = function () use(&$invoked) {
         $invoked++;
     };
     $t->invoke();
     $t->invoke();
     $this->assertEquals(1, $invoked);
     $t->reenable();
     $t->invoke();
     $this->assertEquals(2, $invoked);
 }