diff --git a/src/Exceptions/TwitterException.php b/src/Exceptions/TwitterException.php index e12283e..c289db4 100644 --- a/src/Exceptions/TwitterException.php +++ b/src/Exceptions/TwitterException.php @@ -6,7 +6,7 @@ class TwitterException extends \Exception { - private const PRETTY_PRINT_FLAGS = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; + public const PRETTY_PRINT_FLAGS = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; protected function __construct(string $message) { diff --git a/tests/TwitterExceptionTest.php b/tests/TwitterExceptionTest.php index 01cda28..0b0677d 100644 --- a/tests/TwitterExceptionTest.php +++ b/tests/TwitterExceptionTest.php @@ -34,7 +34,7 @@ ])) ); - expect($exception)->getMessage()->toBe(json_encode($error, JSON_PRETTY_PRINT)); + expect($exception)->getMessage()->toBe(json_encode($error, TwitterException::PRETTY_PRINT_FLAGS)); }); it('can handle 429s', function () {