@@ -113,9 +113,11 @@ public function testSessions()
113113 } catch (\Exception $ e ) {
114114 if ($ this ->isSeleniumDown ($ e )) {
115115 $ this ->markTestSkipped ('selenium server not running ' );
116- } else {
117- throw $ e ;
116+
117+ return ;
118118 }
119+
120+ throw $ e ;
119121 }
120122
121123 $ this ->assertCount (1 , $ this ->driver ->sessions ());
@@ -132,9 +134,11 @@ public function testStatus()
132134 } catch (\Exception $ e ) {
133135 if ($ this ->isSeleniumDown ($ e )) {
134136 $ this ->markTestSkipped ('selenium server not running ' );
135- } else {
136- throw $ e ;
137+
138+ return ;
137139 }
140+
141+ throw $ e ;
138142 }
139143
140144 $ this ->assertCount (3 , $ status );
@@ -149,16 +153,19 @@ public function testStatus()
149153 public function testSeleniumError ()
150154 {
151155 try {
152- $ this ->driver = new WebDriver ($ this ->getTestSeleniumRootUrl ().'/../invalidurl ' );
156+ $ this ->driver = new WebDriver ($ this ->getTestSeleniumRootUrl () . '/../invalidurl ' );
157+
153158 $ status = $ this ->driver ->status ();
154159
155160 $ this ->fail ('Exception not thrown while connecting to invalid Selenium url ' );
156161 } catch (\Exception $ e ) {
157162 if ($ this ->isSeleniumDown ($ e )) {
158163 $ this ->markTestSkipped ('selenium server not running ' );
159- } else {
160- $ this -> assertEquals ( ' WebDriver\Exception\CurlExec ' , get_class ( $ e )) ;
164+
165+ return ;
161166 }
167+
168+ $ this ->assertEquals ('WebDriver\Exception\CurlExec ' , get_class ($ e ));
162169 }
163170 }
164171
@@ -172,9 +179,11 @@ public function testSeleniumErrorResponse()
172179 } catch (\Exception $ e ) {
173180 if ($ this ->isSeleniumDown ($ e )) {
174181 $ this ->markTestSkipped ('selenium server not running ' );
175- } else {
176- throw $ e ;
182+
183+ return ;
177184 }
185+
186+ throw $ e ;
178187 }
179188
180189 try {
@@ -199,9 +208,11 @@ public function testSeleniumNoResponse()
199208 } catch (\Exception $ e ) {
200209 if ($ this ->isSeleniumDown ($ e )) {
201210 $ this ->markTestSkipped ('selenium server not running ' );
202- } else {
203- throw $ e ;
211+
212+ return ;
204213 }
214+
215+ throw $ e ;
205216 }
206217
207218 $ this ->session = $ this ->driver ->session ();
0 commit comments