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()
40
40
public function testDispatchDelegates ()
41
41
{
42
42
$ event = new Event ();
43
+ $ resultEvent = new Event ();
43
44
44
45
$ this ->innerDispatcher ->expects ($ this ->once ())
45
46
->method ('dispatch ' )
46
47
->with ('event ' , $ event )
47
- ->willReturn (' result ' );
48
+ ->willReturn ($ resultEvent );
48
49
49
- $ this ->assertSame (' result ' , $ this ->dispatcher ->dispatch ('event ' , $ event ));
50
+ $ this ->assertSame ($ resultEvent , $ this ->dispatcher ->dispatch ('event ' , $ event ));
50
51
}
51
52
52
53
public function testGetListenersDelegates ()
53
54
{
54
55
$ this ->innerDispatcher ->expects ($ this ->once ())
55
56
->method ('getListeners ' )
56
57
->with ('event ' )
57
- ->willReturn ('result ' );
58
+ ->willReturn ([ 'result ' ] );
58
59
59
- $ this ->assertSame ('result ' , $ this ->dispatcher ->getListeners ('event ' ));
60
+ $ this ->assertSame ([ 'result ' ] , $ this ->dispatcher ->getListeners ('event ' ));
60
61
}
61
62
62
63
public function testHasListenersDelegates ()
63
64
{
64
65
$ this ->innerDispatcher ->expects ($ this ->once ())
65
66
->method ('hasListeners ' )
66
67
->with ('event ' )
67
- ->willReturn (' result ' );
68
+ ->willReturn (true );
68
69
69
- $ this ->assertSame ( ' result ' , $ this ->dispatcher ->hasListeners ('event ' ));
70
+ $ this ->assertTrue ( $ this ->dispatcher ->hasListeners ('event ' ));
70
71
}
71
72
72
73
public function testAddListenerDisallowed ()
You can’t perform that action at this time.
0 commit comments