@@ -24,74 +24,74 @@ Assert::same([], $api->decode($response));
2424$ e = Assert::exception (function () use ($ api ) {
2525 $ response = new Milo \Github \Http \Response (200 , ['Content-Type ' => 'application/json ' ], '[ ' );
2626 $ api ->decode ($ response );
27- }, ' Milo\Github\InvalidResponseException ' , 'JSON decoding failed. ' );
27+ }, Milo \Github \InvalidResponseException::class , 'JSON decoding failed. ' );
2828$ e = Assert::exception (function () use ($ e ) {
2929 throw $ e ->getPrevious ();
30- }, ' Milo\Github\JsonException ' );
30+ }, Milo \Github \JsonException::class );
3131Assert::null ($ e ->getPrevious ());
3232
3333
3434# Invalid JSON
3535$ e = Assert::exception (function () use ($ api ) {
3636 $ response = new Milo \Github \Http \Response (200 , ['Content-Type ' => 'application/json ' ], '"" ' );
3737 $ api ->decode ($ response );
38- }, ' Milo\Github\InvalidResponseException ' , 'Decoded JSON is not an array or object. ' );
38+ }, Milo \Github \InvalidResponseException::class , 'Decoded JSON is not an array or object. ' );
3939Assert::null ($ e ->getPrevious ());
4040
4141
4242$ e = Assert::exception (function () use ($ api ) {
4343 $ response = new Milo \Github \Http \Response (400 , ['Content-Type ' => 'application/json ' ], '{"message":"error"} ' );
4444 $ api ->decode ($ response );
45- }, ' Milo\Github\BadRequestException ' , 'error ' , 400 );
45+ }, Milo \Github \BadRequestException::class , 'error ' , 400 );
4646Assert::null ($ e ->getPrevious ());
4747
4848
4949$ e = Assert::exception (function () use ($ api ) {
5050 $ response = new Milo \Github \Http \Response (401 , ['Content-Type ' => 'application/json ' ], '{"message":"error"} ' );
5151 $ api ->decode ($ response );
52- }, ' Milo\Github\UnauthorizedException ' , 'error ' , 401 );
52+ }, Milo \Github \UnauthorizedException::class , 'error ' , 401 );
5353Assert::null ($ e ->getPrevious ());
5454
5555
5656$ e = Assert::exception (function () use ($ api ) {
5757 $ response = new Milo \Github \Http \Response (403 , ['Content-Type ' => 'application/json ' ], '{"message":"error"} ' );
5858 $ api ->decode ($ response );
59- }, ' Milo\Github\ForbiddenException ' , 'error ' , 403 );
59+ }, Milo \Github \ForbiddenException::class , 'error ' , 403 );
6060Assert::null ($ e ->getPrevious ());
6161
6262
6363$ e = Assert::exception (function () use ($ api ) {
6464 $ response = new Milo \Github \Http \Response (403 , ['Content-Type ' => 'application/json ' , 'X-RateLimit-Remaining ' => '0 ' ], '{"message":"error"} ' );
6565 $ api ->decode ($ response );
66- }, ' Milo\Github\RateLimitExceedException ' , 'error ' , 403 );
66+ }, Milo \Github \RateLimitExceedException::class , 'error ' , 403 );
6767Assert::null ($ e ->getPrevious ());
6868
6969
7070$ e = Assert::exception (function () use ($ api ) {
7171 $ response = new Milo \Github \Http \Response (404 , [], '' );
7272 $ api ->decode ($ response );
73- }, ' Milo\Github\NotFoundException ' , 'Resource not found or not authorized to access. ' , 404 );
73+ }, Milo \Github \NotFoundException::class , 'Resource not found or not authorized to access. ' , 404 );
7474Assert::null ($ e ->getPrevious ());
7575
7676
7777$ e = Assert::exception (function () use ($ api ) {
7878 $ response = new Milo \Github \Http \Response (422 , ['Content-Type ' => 'application/json ' ], '{"message":"error"} ' );
7979 $ api ->decode ($ response );
80- }, ' Milo\Github\UnprocessableEntityException ' , 'error ' , 422 );
80+ }, Milo \Github \UnprocessableEntityException::class , 'error ' , 422 );
8181Assert::null ($ e ->getPrevious ());
8282
8383
8484$ e = Assert::exception (function () use ($ api ) {
8585 $ response = new Milo \Github \Http \Response (422 , ['Content-Type ' => 'application/json ' ], '{"message":"error", "errors":[{"a":"b","c":"d"}]} ' );
8686 $ api ->decode ($ response );
87- }, ' Milo\Github\UnprocessableEntityException ' , 'error[b:d] ' , 422 );
87+ }, Milo \Github \UnprocessableEntityException::class , 'error[b:d] ' , 422 );
8888Assert::null ($ e ->getPrevious ());
8989
9090
9191$ e = Assert::exception (function () use ($ api ) {
9292 $ response = new Milo \Github \Http \Response (500 , [], '' );
9393 $ api ->decode ($ response );
94- }, ' Milo\Github\UnexpectedResponseException ' , 'Expected response with code < 300. ' , 500 );
94+ }, Milo \Github \UnexpectedResponseException::class , 'Expected response with code < 300. ' , 500 );
9595Assert::null ($ e ->getPrevious ());
9696
9797
@@ -101,5 +101,5 @@ Assert::same('foo', $api->decode($response, [500]));
101101$ e = Assert::exception (function () use ($ api ) {
102102 $ response = new Milo \Github \Http \Response (200 , [], '' );
103103 $ api ->decode ($ response , [201 , 304 ]);
104- }, ' Milo\Github\UnexpectedResponseException ' , 'Expected response with code 201 or 304. ' , 200 );
104+ }, Milo \Github \UnexpectedResponseException::class , 'Expected response with code 201 or 304. ' , 200 );
105105Assert::null ($ e ->getPrevious ());
0 commit comments