Example #1
0
 public function testUnbindWorkFine()
 {
     $that = $this;
     $event = new Event();
     $bindCb = function ($args) use($that) {
         $that->bindTestCb();
     };
     $event->bind('test_bind_evt', $bindCb);
     $event->unbind('test_bind_evt', $bindCb);
     $event->fire('test_bind_evt');
     $this->assertArrayNotHasKey('test_bind', $this->dataMap, 'event unbind fail');
 }