@@ -42,7 +42,7 @@ public function testGivenNonTraversableObject_constructorDoesNotCastObjectToArra
4242 $ object = new stdClass ();
4343 $ object ->property = true ;
4444
45- $ this ->setExpectedException ( InvalidArgumentException::class );
45+ $ this ->expectException ( InvalidArgumentException::class );
4646 new ByPropertyIdArray ( $ object );
4747 }
4848
@@ -212,22 +212,22 @@ public function testGetByNotSetIdThrowsException() {
212212 $ indexedArray = new ByPropertyIdArray ();
213213 $ indexedArray ->buildIndex ();
214214
215- $ this ->setExpectedException ( OutOfBoundsException::class );
215+ $ this ->expectException ( OutOfBoundsException::class );
216216
217217 $ indexedArray ->getByPropertyId ( new PropertyId ( 'P9000 ' ) );
218218 }
219219
220220 public function testNotBuildExceptionIsThrownForByPropertyId () {
221221 $ indexedArray = new ByPropertyIdArray ();
222222
223- $ this ->setExpectedException ( RuntimeException::class );
223+ $ this ->expectException ( RuntimeException::class );
224224 $ indexedArray ->getByPropertyId ( new PropertyId ( 'P9000 ' ) );
225225 }
226226
227227 public function testNotBuildExceptionIsThrownForGetPropertyIds () {
228228 $ indexedArray = new ByPropertyIdArray ();
229229
230- $ this ->setExpectedException ( RuntimeException::class );
230+ $ this ->expectException ( RuntimeException::class );
231231 $ indexedArray ->getPropertyIds ();
232232 }
233233
@@ -344,7 +344,7 @@ public function testMoveThrowingOutOfBoundsExceptionIfObjectNotPresent() {
344344 $ indexedArray = new ByPropertyIdArray ( $ statements );
345345 $ indexedArray ->buildIndex ();
346346
347- $ this ->setExpectedException ( OutOfBoundsException::class );
347+ $ this ->expectException ( OutOfBoundsException::class );
348348
349349 $ indexedArray ->moveObjectToIndex ( new Statement ( new PropertyNoValueSnak ( new PropertyId ( 'P9999 ' ) ) ), 0 );
350350 }
@@ -354,7 +354,7 @@ public function testMoveThrowingOutOfBoundsExceptionOnInvalidIndex() {
354354 $ indexedArray = new ByPropertyIdArray ( $ statements );
355355 $ indexedArray ->buildIndex ();
356356
357- $ this ->setExpectedException ( OutOfBoundsException::class );
357+ $ this ->expectException ( OutOfBoundsException::class );
358358
359359 $ indexedArray ->moveObjectToIndex ( $ statements [0 ], 9999 );
360360 }
0 commit comments