@@ -29,7 +29,7 @@ class AuthorizationsTest extends GitHubTestCase
2929 *
3030 * @since 1.0
3131 */
32- protected function setUp ()
32+ protected function setUp (): void
3333 {
3434 parent ::setUp ();
3535
@@ -348,11 +348,11 @@ public function testEditFailure()
348348 * @return void
349349 *
350350 * @since 1.0
351- *
352- * @expectedException \RuntimeException
353351 */
354352 public function testEditTooManyScopes ()
355353 {
354+ $ this ->expectException (\RuntimeException::class);
355+
356356 $ this ->object ->edit (42 , array (), array ('public_repo ' , 'gist ' ), array ('public_repo ' , 'gist ' ), 'My test app ' , 'http://www.joomla.org ' );
357357 }
358358
@@ -382,11 +382,11 @@ public function testGet()
382382 * @return void
383383 *
384384 * @since 1.0
385- *
386- * @expectedException \DomainException
387385 */
388386 public function testGetFailure ()
389387 {
388+ $ this ->expectException (\DomainException::class);
389+
390390 $ this ->response ->code = 500 ;
391391 $ this ->response ->body = $ this ->errorString ;
392392
@@ -424,11 +424,11 @@ public function testGetGrant()
424424 * @return void
425425 *
426426 * @since 1.0
427- *
428- * @expectedException \DomainException
429427 */
430428 public function testGetGrantFailure ()
431429 {
430+ $ this ->expectException (\DomainException::class);
431+
432432 $ this ->response ->code = 500 ;
433433 $ this ->response ->body = $ this ->errorString ;
434434
@@ -466,11 +466,11 @@ public function testGetList()
466466 * @return void
467467 *
468468 * @since 1.0
469- *
470- * @expectedException \DomainException
471469 */
472470 public function testGetListFailure ()
473471 {
472+ $ this ->expectException (\DomainException::class);
473+
474474 $ this ->response ->code = 500 ;
475475 $ this ->response ->body = $ this ->errorString ;
476476
@@ -508,11 +508,11 @@ public function testGetListGrants()
508508 * @return void
509509 *
510510 * @since 1.0
511- *
512- * @expectedException \DomainException
513511 */
514512 public function testGetListGrantsFailure ()
515513 {
514+ $ this ->expectException (\DomainException::class);
515+
516516 $ this ->response ->code = 500 ;
517517 $ this ->response ->body = $ this ->errorString ;
518518
@@ -570,11 +570,11 @@ public function testGetRateLimitUnlimited()
570570 * @return void
571571 *
572572 * @since 1.0
573- *
574- * @expectedException \DomainException
575573 */
576574 public function testGetRateLimitFailure ()
577575 {
576+ $ this ->expectException (\DomainException::class);
577+
578578 $ this ->response ->code = 500 ;
579579 $ this ->response ->body = $ this ->errorString ;
580580
@@ -670,11 +670,11 @@ public function testRequestTokenXml()
670670 * Tests the requestTokenInvalidFormat method
671671 *
672672 * @return void
673- *
674- * @expectedException \UnexpectedValueException
675673 */
676674 public function testRequestTokenInvalidFormat ()
677675 {
676+ $ this ->expectException (\UnexpectedValueException::class);
677+
678678 $ this ->response ->code = 200 ;
679679 $ this ->response ->body = '' ;
680680
@@ -709,11 +709,11 @@ public function testRevokeGrantForApplication()
709709 * @return void
710710 *
711711 * @since 1.0
712- *
713- * @expectedException \DomainException
714712 */
715713 public function testRevokeGrantForApplicationFailure ()
716714 {
715+ $ this ->expectException (\DomainException::class);
716+
717717 $ this ->response ->code = 500 ;
718718 $ this ->response ->body = $ this ->errorString ;
719719
0 commit comments