Exemplo n.º 1
0
 public function testOffMulti()
 {
     $closure = function () {
     };
     $closure1 = function () {
     };
     $this->event->on(array('a', 'b'), $closure);
     $this->event->addListener(array('a', 'b'), $closure1);
     $this->assertEquals(array($closure, $closure1), $this->event->listeners('a'));
     $this->assertEquals(array($closure, $closure1), $this->event->listeners('b'));
     $this->event->off(array('a', 'b'), $closure);
     $this->assertEquals(array(1 => $closure1), $this->event->listeners('a'));
     $this->assertEquals(array(1 => $closure1), $this->event->listeners('b'));
 }