1212use MabeEnumTest \TestAsset \Enum64 ;
1313use MabeEnumTest \TestAsset \Enum65 ;
1414use MabeEnumTest \TestAsset \Enum66 ;
15- use PHPUnit_Framework_TestCase as TestCase ;
15+ use PHPUnit \ Framework \ TestCase ;
1616
1717/**
1818 * Unit tests for the class MabeEnum\EnumSet
@@ -157,14 +157,14 @@ public function testIterateAndDetach()
157157
158158 public function testConstructThrowsInvalidArgumentExceptionIfEnumClassDoesNotExtendBaseEnum ()
159159 {
160- $ this ->setExpectedException (InvalidArgumentException::class);
160+ $ this ->expectException (InvalidArgumentException::class);
161161 new EnumSet (self ::class);
162162 }
163163
164164 public function testInitEnumThrowsInvalidArgumentExceptionOnInvalidEnum ()
165165 {
166166 $ enumSet = new EnumSet (EnumBasic::class);
167- $ this ->setExpectedException (InvalidArgumentException::class);
167+ $ this ->expectException (InvalidArgumentException::class);
168168 $ this ->assertFalse ($ enumSet ->contains (EnumInheritance::INHERITANCE ()));
169169 }
170170
@@ -396,15 +396,15 @@ public function testSetBinaryBitsetLeBinOutOfRangeBitsOfExtendedBytes1()
396396 {
397397 $ enumSet = new EnumSet (Enum65::class);
398398
399- $ this ->setExpectedException (InvalidArgumentException::class, 'Out-Of-Range ' );
399+ $ this ->expectException (InvalidArgumentException::class, 'Out-Of-Range ' );
400400 $ enumSet ->setBinaryBitsetLe ("\xff\xff\xff\xff\xff\xff\xff\xff\x00\x02" );
401401 }
402402
403403 public function testSetBinaryBitsetLeBinOutOfRangeBitsOfExtendedBytes2 ()
404404 {
405405 $ enumSet = new EnumSet (Enum65::class);
406406
407- $ this ->setExpectedException (InvalidArgumentException::class, 'Out-Of-Range ' );
407+ $ this ->expectException (InvalidArgumentException::class, 'Out-Of-Range ' );
408408 $ enumSet ->setBinaryBitsetLe ("\xff\xff\xff\xff\xff\xff\xff\xff\x02" );
409409 }
410410
@@ -416,13 +416,13 @@ public function testSetBinaryBitsetLeBinOutOfRangeBitsOfLastValidByte()
416416 $ bitset = $ enumSet ->getBinaryBitsetLe ();
417417 $ newBitset = substr ($ bitset , 0 , -1 ) . "\x02" ;
418418
419- $ this ->setExpectedException (InvalidArgumentException::class, 'Out-Of-Range ' );
419+ $ this ->expectException (InvalidArgumentException::class, 'Out-Of-Range ' );
420420 $ enumSet ->setBinaryBitsetLe ($ newBitset );
421421 }
422422
423423 public function testSetBinaryBitsetLeBinArgumentExceptionIfNotString ()
424424 {
425- $ this ->setExpectedException (InvalidArgumentException::class);
425+ $ this ->expectException (InvalidArgumentException::class);
426426
427427 $ enum = new EnumSet (Enum65::class);
428428 $ enum ->setBinaryBitsetLe (0 );
@@ -450,15 +450,15 @@ public function testSetBinaryBitsetLeIntOutOfRangeBitsOfExtendedBytes1()
450450 {
451451 $ enumSet = new EnumSet (EnumBasic::class);
452452
453- $ this ->setExpectedException (InvalidArgumentException::class, 'Out-Of-Range ' );
453+ $ this ->expectException (InvalidArgumentException::class, 'Out-Of-Range ' );
454454 $ enumSet ->setBinaryBitsetLe ("\x0A\xFF\x01" );
455455 }
456456
457457 public function testSetBinaryBitsetLeIntOutOfRangeBitsOfExtendedBytes2 ()
458458 {
459459 $ enumSet = new EnumSet (EnumBasic::class);
460460
461- $ this ->setExpectedException (InvalidArgumentException::class, 'Out-Of-Range ' );
461+ $ this ->expectException (InvalidArgumentException::class, 'Out-Of-Range ' );
462462 $ enumSet ->setBinaryBitsetLe ("\x01\x01\x01\x01\x01\x01\x01\x01\x01" );
463463 }
464464
@@ -470,7 +470,7 @@ public function testSetBinaryBitsetLeIntOutOfRangeBitsOfLastValidByte()
470470 $ bitset = $ enumSet ->getBinaryBitsetLe ();
471471 $ newBitset = substr ($ bitset , 0 , -1 ) . "\xFF" ;
472472
473- $ this ->setExpectedException (InvalidArgumentException::class, 'Out-Of-Range ' );
473+ $ this ->expectException (InvalidArgumentException::class, 'Out-Of-Range ' );
474474 $ enumSet ->setBinaryBitsetLe ($ newBitset );
475475 }
476476
@@ -488,7 +488,7 @@ public function testSetBinaryBitsetBe()
488488
489489 public function testSetBinaryBitsetBeArgumentExceptionIfNotString ()
490490 {
491- $ this ->setExpectedException (InvalidArgumentException::class);
491+ $ this ->expectException (InvalidArgumentException::class);
492492
493493 $ enum = new EnumSet (Enum65::class);
494494 $ enum ->setBinaryBitsetBe (0 );
@@ -805,7 +805,7 @@ public function testUnionThrowsInvalidArgumentException()
805805 $ set1 = new EnumSet (EnumBasic::class);
806806 $ set2 = new EnumSet (Enum32::class);
807807
808- $ this ->setExpectedException (InvalidArgumentException::class);
808+ $ this ->expectException (InvalidArgumentException::class);
809809 $ set1 ->union ($ set2 );
810810 }
811811
@@ -830,7 +830,7 @@ public function testIntersectThrowsInvalidArgumentException()
830830 $ set1 = new EnumSet (EnumBasic::class);
831831 $ set2 = new EnumSet (Enum32::class);
832832
833- $ this ->setExpectedException (InvalidArgumentException::class);
833+ $ this ->expectException (InvalidArgumentException::class);
834834 $ set1 ->intersect ($ set2 );
835835 }
836836
@@ -855,7 +855,7 @@ public function testDiffThrowsInvalidArgumentException()
855855 $ set1 = new EnumSet (EnumBasic::class);
856856 $ set2 = new EnumSet (Enum32::class);
857857
858- $ this ->setExpectedException (InvalidArgumentException::class);
858+ $ this ->expectException (InvalidArgumentException::class);
859859 $ set1 ->diff ($ set2 );
860860 }
861861
@@ -883,7 +883,7 @@ public function testSymDiffThrowsInvalidArgumentException()
883883 $ set1 = new EnumSet (EnumBasic::class);
884884 $ set2 = new EnumSet (Enum32::class);
885885
886- $ this ->setExpectedException (InvalidArgumentException::class);
886+ $ this ->expectException (InvalidArgumentException::class);
887887 $ set1 ->symDiff ($ set2 );
888888 }
889889}
0 commit comments