comparison vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 1fec387a4317
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
54 54
55 public function testAddListener() 55 public function testAddListener()
56 { 56 {
57 $this->dispatcher->addListener('pre.foo', array($this->listener, 'preFoo')); 57 $this->dispatcher->addListener('pre.foo', array($this->listener, 'preFoo'));
58 $this->dispatcher->addListener('post.foo', array($this->listener, 'postFoo')); 58 $this->dispatcher->addListener('post.foo', array($this->listener, 'postFoo'));
59 $this->assertTrue($this->dispatcher->hasListeners());
59 $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); 60 $this->assertTrue($this->dispatcher->hasListeners(self::preFoo));
60 $this->assertTrue($this->dispatcher->hasListeners(self::postFoo)); 61 $this->assertTrue($this->dispatcher->hasListeners(self::postFoo));
61 $this->assertCount(1, $this->dispatcher->getListeners(self::preFoo)); 62 $this->assertCount(1, $this->dispatcher->getListeners(self::preFoo));
62 $this->assertCount(1, $this->dispatcher->getListeners(self::postFoo)); 63 $this->assertCount(1, $this->dispatcher->getListeners(self::postFoo));
63 $this->assertCount(2, $this->dispatcher->getListeners()); 64 $this->assertCount(2, $this->dispatcher->getListeners());