@@ -83,66 +83,10 @@ public function testClientInvalidAddress()
83
83
$ this ->expectPromiseReject ($ promise );
84
84
}
85
85
86
- public function testServerSuccess ()
87
- {
88
- $ promise = $ this ->factory ->createServer ('tcp://localhost:1337 ' );
89
-
90
- $ this ->expectPromiseResolve ($ promise )->then (function (Server $ server ) {
91
- $ server ->close ();
92
- });
93
- }
94
-
95
86
public function testClientRequiresConnector ()
96
87
{
97
88
$ factory = new Factory ($ this ->loop );
98
89
99
90
$ this ->expectPromiseReject ($ factory ->createClient ());
100
91
}
101
-
102
- public function testPairAuthRejectDisconnects ()
103
- {
104
- $ server = null ;
105
-
106
- $ address = '127.0.0.1:1337 ' ;
107
-
108
- // start a server that only sends ERR messages.
109
- $ this ->factory ->createServer ('tcp:// ' . $ address )->then (function (Server $ s ) use (&$ server ) {
110
- $ server = $ s ;
111
- });
112
-
113
- $ this ->assertNotNull ($ server );
114
-
115
- // we expect a single single client
116
- $ server ->on ('connection ' , $ this ->expectCallableOnce ());
117
-
118
- $ once = $ this ->expectCallableOnce ();
119
- $ server ->on ('connection ' , function (ConnectionInterface $ connection ) use ($ once , $ server ) {
120
- // we expect the client to close the connection once he receives an ERR messages.
121
- $ connection ->on ('close ' , $ once );
122
-
123
- // end the loop (stop ticking)
124
- $ connection ->on ('close ' , function () use ($ server ) {
125
- $ server ->close ();
126
- });
127
- });
128
-
129
- // we expect the factory to fail because of the ERR message.
130
- $ this ->expectPromiseReject ($ this ->factory ->createClient ('tcp://auth@ ' . $ address ));
131
-
132
- $ this ->loop ->run ();
133
- }
134
-
135
- public function testServerAddressInvalidFail ()
136
- {
137
- $ promise = $ this ->factory ->createServer ('invalid address ' );
138
-
139
- $ this ->expectPromiseReject ($ promise );
140
- }
141
-
142
- public function testServerAddressInUseFail ()
143
- {
144
- $ promise = $ this ->factory ->createServer ('tcp://localhost:6379 ' );
145
-
146
- $ this ->expectPromiseReject ($ promise );
147
- }
148
92
}
0 commit comments