File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -659,7 +659,7 @@ public function testExtension()
659
659
$ container ->registerExtension ($ extension = new \ProjectExtension ());
660
660
$ this ->assertTrue ($ container ->getExtension ('project ' ) === $ extension , '->registerExtension() registers an extension ' );
661
661
662
- $ this ->setExpectedException ('LogicException ' );
662
+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('LogicException ' );
663
663
$ container ->getExtension ('no_registered ' );
664
664
}
665
665
Original file line number Diff line number Diff line change @@ -67,7 +67,14 @@ public function testSetGetDecoratedService()
67
67
$ this ->assertNull ($ def ->getDecoratedService ());
68
68
69
69
$ def = new Definition ('stdClass ' );
70
- $ this ->setExpectedException ('InvalidArgumentException ' , 'The decorated service inner name for "foo" must be different than the service name itself. ' );
70
+
71
+ if (method_exists ($ this , 'expectException ' )) {
72
+ $ this ->expectException ('InvalidArgumentException ' );
73
+ $ this ->expectExceptionMessage ('The decorated service inner name for "foo" must be different than the service name itself. ' );
74
+ } else {
75
+ $ this ->setExpectedException ('InvalidArgumentException ' , 'The decorated service inner name for "foo" must be different than the service name itself. ' );
76
+ }
77
+
71
78
$ def ->setDecoratedService ('foo ' , 'foo ' );
72
79
}
73
80
You can’t perform that action at this time.
0 commit comments