diff --git a/src/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php index 03e0f4e45434a..da8502ab93c55 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php @@ -40,13 +40,14 @@ protected function setUp() public function testDispatchDelegates() { $event = new Event(); + $resultEvent = new Event(); $this->innerDispatcher->expects($this->once()) ->method('dispatch') ->with('event', $event) - ->willReturn('result'); + ->willReturn($resultEvent); - $this->assertSame('result', $this->dispatcher->dispatch('event', $event)); + $this->assertSame($resultEvent, $this->dispatcher->dispatch('event', $event)); } public function testGetListenersDelegates() @@ -54,9 +55,9 @@ public function testGetListenersDelegates() $this->innerDispatcher->expects($this->once()) ->method('getListeners') ->with('event') - ->willReturn('result'); + ->willReturn(['result']); - $this->assertSame('result', $this->dispatcher->getListeners('event')); + $this->assertSame(['result'], $this->dispatcher->getListeners('event')); } public function testHasListenersDelegates() @@ -64,9 +65,9 @@ public function testHasListenersDelegates() $this->innerDispatcher->expects($this->once()) ->method('hasListeners') ->with('event') - ->willReturn('result'); + ->willReturn(true); - $this->assertSame('result', $this->dispatcher->hasListeners('event')); + $this->assertTrue($this->dispatcher->hasListeners('event')); } public function testAddListenerDisallowed()
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: