public function testInvalidListenerObject() { $this->setExpectedException('\\InvalidArgumentException'); $this->object->addListener(function ($event) { return false; }); }
/** */ public function testRemoveListener() { $eventName = 'test'; $dispatcher = new Dispatcher(); $listener = new Listener($eventName); $dispatcher->addListener($eventName, $listener); $dispatcher->removeListener($eventName, $listener); $this->assertEmpty($dispatcher->getListeners()); }