You are here

public function EventManagerTest::testDispatchEvent in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/common/tests/Doctrine/Tests/Common/EventManagerTest.php \Doctrine\Tests\Common\EventManagerTest::testDispatchEvent()

File

vendor/doctrine/common/tests/Doctrine/Tests/Common/EventManagerTest.php, line 45

Class

EventManagerTest

Namespace

Doctrine\Tests\Common

Code

public function testDispatchEvent() {
  $this->_eventManager
    ->addEventListener(array(
    'preFoo',
    'postFoo',
  ), $this);
  $this->_eventManager
    ->dispatchEvent(self::preFoo);
  $this
    ->assertTrue($this->_preFooInvoked);
  $this
    ->assertFalse($this->_postFooInvoked);
}