@@ -113,9 +113,11 @@ public function testSessions()
113
113
} catch (\Exception $ e ) {
114
114
if ($ this ->isSeleniumDown ($ e )) {
115
115
$ this ->markTestSkipped ('selenium server not running ' );
116
- } else {
117
- throw $ e ;
116
+
117
+ return ;
118
118
}
119
+
120
+ throw $ e ;
119
121
}
120
122
121
123
$ this ->assertCount (1 , $ this ->driver ->sessions ());
@@ -132,9 +134,11 @@ public function testStatus()
132
134
} catch (\Exception $ e ) {
133
135
if ($ this ->isSeleniumDown ($ e )) {
134
136
$ this ->markTestSkipped ('selenium server not running ' );
135
- } else {
136
- throw $ e ;
137
+
138
+ return ;
137
139
}
140
+
141
+ throw $ e ;
138
142
}
139
143
140
144
$ this ->assertCount (3 , $ status );
@@ -149,16 +153,19 @@ public function testStatus()
149
153
public function testSeleniumError ()
150
154
{
151
155
try {
152
- $ this ->driver = new WebDriver ($ this ->getTestSeleniumRootUrl ().'/../invalidurl ' );
156
+ $ this ->driver = new WebDriver ($ this ->getTestSeleniumRootUrl () . '/../invalidurl ' );
157
+
153
158
$ status = $ this ->driver ->status ();
154
159
155
160
$ this ->fail ('Exception not thrown while connecting to invalid Selenium url ' );
156
161
} catch (\Exception $ e ) {
157
162
if ($ this ->isSeleniumDown ($ e )) {
158
163
$ this ->markTestSkipped ('selenium server not running ' );
159
- } else {
160
- $ this -> assertEquals ( ' WebDriver\Exception\CurlExec ' , get_class ( $ e )) ;
164
+
165
+ return ;
161
166
}
167
+
168
+ $ this ->assertEquals ('WebDriver\Exception\CurlExec ' , get_class ($ e ));
162
169
}
163
170
}
164
171
@@ -172,9 +179,11 @@ public function testSeleniumErrorResponse()
172
179
} catch (\Exception $ e ) {
173
180
if ($ this ->isSeleniumDown ($ e )) {
174
181
$ this ->markTestSkipped ('selenium server not running ' );
175
- } else {
176
- throw $ e ;
182
+
183
+ return ;
177
184
}
185
+
186
+ throw $ e ;
178
187
}
179
188
180
189
try {
@@ -199,9 +208,11 @@ public function testSeleniumNoResponse()
199
208
} catch (\Exception $ e ) {
200
209
if ($ this ->isSeleniumDown ($ e )) {
201
210
$ this ->markTestSkipped ('selenium server not running ' );
202
- } else {
203
- throw $ e ;
211
+
212
+ return ;
204
213
}
214
+
215
+ throw $ e ;
205
216
}
206
217
207
218
$ this ->session = $ this ->driver ->session ();
0 commit comments