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 @@ -621,7 +621,7 @@ public function testExtension()
621
621
$ container ->registerExtension ($ extension = new \ProjectExtension ());
622
622
$ this ->assertTrue ($ container ->getExtension ('project ' ) === $ extension , '->registerExtension() registers an extension ' );
623
623
624
- $ this ->setExpectedException ('LogicException ' );
624
+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('LogicException ' );
625
625
$ container ->getExtension ('no_registered ' );
626
626
}
627
627
Original file line number Diff line number Diff line change @@ -59,7 +59,14 @@ public function testSetGetDecoratedService()
59
59
$ this ->assertNull ($ def ->getDecoratedService ());
60
60
61
61
$ def = new Definition ('stdClass ' );
62
- $ this ->setExpectedException ('InvalidArgumentException ' , 'The decorated service inner name for "foo" must be different than the service name itself. ' );
62
+
63
+ if (method_exists ($ this , 'expectException ' )) {
64
+ $ this ->expectException ('InvalidArgumentException ' );
65
+ $ this ->expectExceptionMessage ('The decorated service inner name for "foo" must be different than the service name itself. ' );
66
+ } else {
67
+ $ this ->setExpectedException ('InvalidArgumentException ' , 'The decorated service inner name for "foo" must be different than the service name itself. ' );
68
+ }
69
+
63
70
$ def ->setDecoratedService ('foo ' , 'foo ' );
64
71
}
65
72
You can’t perform that action at this time.
0 commit comments