@@ -195,7 +195,7 @@ public function testMatchOverriddenRoute()
195
195
$ matcher = new UrlMatcher ($ collection , new RequestContext ());
196
196
197
197
$ this ->assertEquals (array ('_route ' => 'foo ' ), $ matcher ->match ('/foo1 ' ));
198
- $ this ->setExpectedException ('Symfony\Component\Routing\Exception\ResourceNotFoundException ' );
198
+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('Symfony\Component\Routing\Exception\ResourceNotFoundException ' );
199
199
$ this ->assertEquals (array (), $ matcher ->match ('/foo ' ));
200
200
}
201
201
@@ -252,7 +252,7 @@ public function testAdjacentVariables()
252
252
// z and _format are optional.
253
253
$ this ->assertEquals (array ('w ' => 'wwwww ' , 'x ' => 'x ' , 'y ' => 'y ' , 'z ' => 'default-z ' , '_format ' => 'html ' , '_route ' => 'test ' ), $ matcher ->match ('/wwwwwxy ' ));
254
254
255
- $ this ->setExpectedException ('Symfony\Component\Routing\Exception\ResourceNotFoundException ' );
255
+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('Symfony\Component\Routing\Exception\ResourceNotFoundException ' );
256
256
$ matcher ->match ('/wxy.html ' );
257
257
}
258
258
@@ -267,7 +267,7 @@ public function testOptionalVariableWithNoRealSeparator()
267
267
268
268
// Usually the character in front of an optional parameter can be left out, e.g. with pattern '/get/{what}' just '/get' would match.
269
269
// But here the 't' in 'get' is not a separating character, so it makes no sense to match without it.
270
- $ this ->setExpectedException ('Symfony\Component\Routing\Exception\ResourceNotFoundException ' );
270
+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('Symfony\Component\Routing\Exception\ResourceNotFoundException ' );
271
271
$ matcher ->match ('/ge ' );
272
272
}
273
273
0 commit comments