You are here

public function EventManagerTest::testAddEventSubscriber in Plug 7

File

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

Class

EventManagerTest

Namespace

Doctrine\Tests\Common

Code

public function testAddEventSubscriber() {
  $eventSubscriber = new TestEventSubscriber();
  $this->_eventManager
    ->addEventSubscriber($eventSubscriber);
  $this
    ->assertTrue($this->_eventManager
    ->hasListeners(self::preFoo));
  $this
    ->assertTrue($this->_eventManager
    ->hasListeners(self::postFoo));
}