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()
621621 $ container ->registerExtension ($ extension = new \ProjectExtension ());
622622 $ this ->assertTrue ($ container ->getExtension ('project ' ) === $ extension , '->registerExtension() registers an extension ' );
623623
624- $ this ->setExpectedException ('LogicException ' );
624+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('LogicException ' );
625625 $ container ->getExtension ('no_registered ' );
626626 }
627627
Original file line number Diff line number Diff line change @@ -59,7 +59,14 @@ public function testSetGetDecoratedService()
5959 $ this ->assertNull ($ def ->getDecoratedService ());
6060
6161 $ 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+
6370 $ def ->setDecoratedService ('foo ' , 'foo ' );
6471 }
6572
You can’t perform that action at this time.
0 commit comments