44
55use Matthias \SymfonyDependencyInjectionTest \PhpUnit \AbstractExtensionTestCase ;
66use Matthias \SymfonyDependencyInjectionTest \Tests \Fixtures \MatthiasDependencyInjectionTestExtension ;
7+ use PHPUnit \Framework \ExpectationFailedException ;
78
89class AbstractExtensionTestCaseTest extends AbstractExtensionTestCase
910{
@@ -57,7 +58,7 @@ public function if_service_is_undefined_it_fails()
5758 {
5859 $ this ->load ();
5960
60- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
61+ $ this ->expectException (ExpectationFailedException ::class);
6162
6263 $ this ->assertContainerBuilderHasService ('undefined ' , 'AnyClass ' );
6364 }
@@ -69,7 +70,7 @@ public function if_synthetic_service_is_undefined_it_fails()
6970 {
7071 $ this ->load ();
7172
72- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
73+ $ this ->expectException (ExpectationFailedException ::class);
7374 $ this ->expectExceptionMessage ('no service ' );
7475
7576 $ this ->assertContainerBuilderHasSyntheticService ('undefined ' );
@@ -82,7 +83,7 @@ public function if_service_is_defined_but_not_synthetic_it_fails()
8283 {
8384 $ this ->load ();
8485
85- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
86+ $ this ->expectException (ExpectationFailedException ::class);
8687 $ this ->expectExceptionMessage ('synthetic ' );
8788
8889 $ this ->assertContainerBuilderHasSyntheticService ('loaded_service_id ' );
@@ -95,7 +96,7 @@ public function if_service_is_defined_but_has_another_class_it_fails()
9596 {
9697 $ this ->load ();
9798
98- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
99+ $ this ->expectException (ExpectationFailedException ::class);
99100 $ this ->expectExceptionMessage ('stdClass ' );
100101
101102 $ this ->assertContainerBuilderHasService ('manual_service_id ' , 'SomeOtherClass ' );
@@ -108,7 +109,7 @@ public function if_alias_is_not_defined_it_fails()
108109 {
109110 $ this ->load ();
110111
111- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
112+ $ this ->expectException (ExpectationFailedException ::class);
112113
113114 $ this ->assertContainerBuilderHasAlias ('undefined ' , 'any_service_id ' );
114115 }
@@ -120,7 +121,7 @@ public function if_alias_exists_but_for_wrong_service_it_fails()
120121 {
121122 $ this ->load ();
122123
123- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
124+ $ this ->expectException (ExpectationFailedException ::class);
124125 $ this ->expectExceptionMessage ('service_id ' );
125126
126127 $ this ->assertContainerBuilderHasAlias ('manual_alias ' , 'wrong ' );
@@ -133,7 +134,7 @@ public function if_parameter_does_not_exist_it_fails()
133134 {
134135 $ this ->load ();
135136
136- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
137+ $ this ->expectException (ExpectationFailedException ::class);
137138 $ this ->expectExceptionMessage ('undefined ' );
138139
139140 $ this ->assertContainerBuilderHasParameter ('undefined ' , 'any value ' );
@@ -146,7 +147,7 @@ public function if_parameter_exists_but_has_wrong_value_it_fails()
146147 {
147148 $ this ->load ();
148149
149- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
150+ $ this ->expectException (ExpectationFailedException ::class);
150151 $ this ->expectExceptionMessage ('parameter value ' );
151152
152153 $ this ->assertContainerBuilderHasParameter ('manual_parameter ' , 'wrong ' );
@@ -159,7 +160,7 @@ public function if_definition_does_not_have_argument_it_fails()
159160 {
160161 $ this ->load ();
161162
162- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
163+ $ this ->expectException (ExpectationFailedException ::class);
163164 $ this ->expectExceptionMessage ('10 ' );
164165
165166 $ this ->assertContainerBuilderHasServiceDefinitionWithArgument ('manual_service_id ' , 10 , 'any value ' );
@@ -172,7 +173,7 @@ public function if_definition_has_argument_but_with_wrong_value_it_fails()
172173 {
173174 $ this ->load ();
174175
175- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
176+ $ this ->expectException (ExpectationFailedException ::class);
176177
177178 $ this ->assertContainerBuilderHasServiceDefinitionWithArgument ('manual_service_id ' , 1 , 'wrong value ' );
178179 }
@@ -184,7 +185,7 @@ public function if_definition_is_decorated_and_argument_has_wrong_value_it_fails
184185 {
185186 $ this ->load ();
186187
187- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
188+ $ this ->expectException (ExpectationFailedException ::class);
188189 $ this ->expectExceptionMessage ('second argument ' );
189190
190191 $ this ->assertContainerBuilderHasServiceDefinitionWithArgument ('child_service_id ' , 1 , 'wrong value ' );
@@ -197,7 +198,7 @@ public function if_definition_is_decorated_but_by_the_wrong_parent_it_fails()
197198 {
198199 $ this ->load ();
199200
200- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
201+ $ this ->expectException (ExpectationFailedException ::class);
201202 $ this ->expectExceptionMessage ('parent_service_id ' );
202203
203204 $ this ->assertContainerBuilderHasServiceDefinitionWithParent ('child_service_id ' , 'wrong_parent_service_id ' );
@@ -210,7 +211,7 @@ public function if_definition_should_be_decorated_when_it_is_not_it_fails()
210211 {
211212 $ this ->load ();
212213
213- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
214+ $ this ->expectException (ExpectationFailedException ::class);
214215 $ this ->expectExceptionMessage ('parent ' );
215216
216217 $ this ->assertContainerBuilderHasServiceDefinitionWithParent ('parent_service_id ' , 'any_other_service_id ' );
@@ -223,7 +224,7 @@ public function if_definition_should_have_a_method_call_and_it_has_not_it_fails(
223224 {
224225 $ this ->load ();
225226
226- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
227+ $ this ->expectException (ExpectationFailedException ::class);
227228 $ this ->expectExceptionMessage ('wrongMethodName ' );
228229
229230 $ this ->assertContainerBuilderHasServiceDefinitionWithMethodCall (
@@ -240,7 +241,7 @@ public function if_definition_should_have_a_certain_arguments_for_a_method_call_
240241 {
241242 $ this ->load ();
242243
243- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
244+ $ this ->expectException (ExpectationFailedException ::class);
244245 $ this ->expectExceptionMessage ('theRightMethodName ' );
245246
246247 $ this ->assertContainerBuilderHasServiceDefinitionWithMethodCall (
@@ -257,7 +258,7 @@ public function if_service_is_defined_it_fails()
257258 {
258259 $ this ->load ();
259260
260- $ this ->expectException (\PHPUnit_Framework_ExpectationFailedException ::class);
261+ $ this ->expectException (ExpectationFailedException ::class);
261262
262263 $ this ->assertContainerBuilderNotHasService ('loaded_service_id ' );
263264 }
0 commit comments