Example #1
0
 function testObjectCallEvent()
 {
     $user = new Mock\User();
     $c = 0;
     $user->magery('call', 'isAllowed', function () use(&$c) {
         $c++;
         return true;
     });
     $result = $user->isAllowed();
     $this->assertEquals($result, true);
     $this->assertEquals(1, $c);
 }