@@ -59,8 +59,9 @@ public function connectionToEmptyIp6PortShouldFail()
59
59
$ dns = $ this ->createResolverMock ();
60
60
61
61
$ connector = new Connector ($ loop , $ dns );
62
- $ connector ->create ('::1 ' , 9999 )
63
- ->then ($ this ->expectCallableNever (), $ this ->expectCallableOnce ());
62
+ $ connector
63
+ ->create ('::1 ' , 9999 )
64
+ ->then ($ this ->expectCallableNever (), $ this ->expectCallableOnce ());
64
65
65
66
$ loop ->run ();
66
67
}
@@ -74,23 +75,22 @@ public function connectionToIp6TcpServerShouldSucceed()
74
75
75
76
$ server = new Server ($ loop );
76
77
$ server ->on ('connection ' , $ this ->expectCallableOnce ());
77
- $ server ->on ('connection ' , function () use ($ server , $ loop ) {
78
- $ server ->shutdown ();
79
- });
78
+ $ server ->on ('connection ' , array ($ server , 'shutdown ' ));
80
79
$ server ->listen (9999 , '::1 ' );
81
80
82
81
$ dns = $ this ->createResolverMock ();
83
82
84
83
$ connector = new Connector ($ loop , $ dns );
85
- $ connector ->create ('::1 ' , 9999 )
86
- ->then (function ($ stream ) use (&$ capturedStream ) {
87
- $ capturedStream = $ stream ;
88
- $ stream ->end ();
89
- });
84
+ $ connector
85
+ ->create ('::1 ' , 9999 )
86
+ ->then (function ($ stream ) use (&$ capturedStream ) {
87
+ $ capturedStream = $ stream ;
88
+ $ stream ->end ();
89
+ });
90
90
91
- $ loop ->run ();
91
+ $ loop ->run ();
92
92
93
- $ this ->assertInstanceOf ('React\Stream\Stream ' , $ capturedStream );
93
+ $ this ->assertInstanceOf ('React\Stream\Stream ' , $ capturedStream );
94
94
}
95
95
96
96
private function createResolverMock ()
0 commit comments