File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -40,33 +40,34 @@ protected function setUp()
4040 public function testDispatchDelegates ()
4141 {
4242 $ event = new Event ();
43+ $ resultEvent = new Event ();
4344
4445 $ this ->innerDispatcher ->expects ($ this ->once ())
4546 ->method ('dispatch ' )
4647 ->with ('event ' , $ event )
47- ->willReturn (' result ' );
48+ ->willReturn ($ resultEvent );
4849
49- $ this ->assertSame (' result ' , $ this ->dispatcher ->dispatch ('event ' , $ event ));
50+ $ this ->assertSame ($ resultEvent , $ this ->dispatcher ->dispatch ('event ' , $ event ));
5051 }
5152
5253 public function testGetListenersDelegates ()
5354 {
5455 $ this ->innerDispatcher ->expects ($ this ->once ())
5556 ->method ('getListeners ' )
5657 ->with ('event ' )
57- ->willReturn ('result ' );
58+ ->willReturn ([ 'result ' ] );
5859
59- $ this ->assertSame ('result ' , $ this ->dispatcher ->getListeners ('event ' ));
60+ $ this ->assertSame ([ 'result ' ] , $ this ->dispatcher ->getListeners ('event ' ));
6061 }
6162
6263 public function testHasListenersDelegates ()
6364 {
6465 $ this ->innerDispatcher ->expects ($ this ->once ())
6566 ->method ('hasListeners ' )
6667 ->with ('event ' )
67- ->willReturn (' result ' );
68+ ->willReturn (true );
6869
69- $ this ->assertSame ( ' result ' , $ this ->dispatcher ->hasListeners ('event ' ));
70+ $ this ->assertTrue ( $ this ->dispatcher ->hasListeners ('event ' ));
7071 }
7172
7273 public function testAddListenerDisallowed ()
You can’t perform that action at this time.
0 commit comments