@@ -21,21 +21,17 @@ class ArrayNodeTest extends TestCase
2121{
2222 use ForwardCompatTestTrait;
2323
24- /**
25- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException
26- */
2724 public function testNormalizeThrowsExceptionWhenFalseIsNotAllowed ()
2825 {
26+ $ this ->expectException ('Symfony\Component\Config\Definition\Exception\InvalidTypeException ' );
2927 $ node = new ArrayNode ('root ' );
3028 $ node ->normalize (false );
3129 }
3230
33- /**
34- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
35- * @expectedExceptionMessage Unrecognized option "foo" under "root"
36- */
3731 public function testExceptionThrownOnUnrecognizedChild ()
3832 {
33+ $ this ->expectException ('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException ' );
34+ $ this ->expectExceptionMessage ('Unrecognized option "foo" under "root" ' );
3935 $ node = new ArrayNode ('root ' );
4036 $ node ->normalize (['foo ' => 'bar ' ]);
4137 }
@@ -179,24 +175,20 @@ public function getPreNormalizedNormalizedOrderedData()
179175 ];
180176 }
181177
182- /**
183- * @expectedException \InvalidArgumentException
184- * @expectedExceptionMessage Child nodes must be named.
185- */
186178 public function testAddChildEmptyName ()
187179 {
180+ $ this ->expectException ('InvalidArgumentException ' );
181+ $ this ->expectExceptionMessage ('Child nodes must be named. ' );
188182 $ node = new ArrayNode ('root ' );
189183
190184 $ childNode = new ArrayNode ('' );
191185 $ node ->addChild ($ childNode );
192186 }
193187
194- /**
195- * @expectedException \InvalidArgumentException
196- * @expectedExceptionMessage A child node named "foo" already exists.
197- */
198188 public function testAddChildNameAlreadyExists ()
199189 {
190+ $ this ->expectException ('InvalidArgumentException ' );
191+ $ this ->expectExceptionMessage ('A child node named "foo" already exists. ' );
200192 $ node = new ArrayNode ('root ' );
201193
202194 $ childNode = new ArrayNode ('foo ' );
@@ -206,12 +198,10 @@ public function testAddChildNameAlreadyExists()
206198 $ node ->addChild ($ childNodeWithSameName );
207199 }
208200
209- /**
210- * @expectedException \RuntimeException
211- * @expectedExceptionMessage The node at path "foo" has no default value.
212- */
213201 public function testGetDefaultValueWithoutDefaultValue ()
214202 {
203+ $ this ->expectException ('RuntimeException ' );
204+ $ this ->expectExceptionMessage ('The node at path "foo" has no default value. ' );
215205 $ node = new ArrayNode ('foo ' );
216206 $ node ->getDefaultValue ();
217207 }
0 commit comments