You are here

public function EventManagerTest::testRemoveEventListener in Plug 7

File

lib/doctrine/common/tests/Doctrine/Tests/Common/EventManagerTest.php, line 53

Class

EventManagerTest

Namespace

Doctrine\Tests\Common

Code

public function testRemoveEventListener() {
  $this->_eventManager
    ->addEventListener(array(
    'preBar',
  ), $this);
  $this
    ->assertTrue($this->_eventManager
    ->hasListeners(self::preBar));
  $this->_eventManager
    ->removeEventListener(array(
    'preBar',
  ), $this);
  $this
    ->assertFalse($this->_eventManager
    ->hasListeners(self::preBar));
}