From 4823bfde8bc23c0d4c86f9d4f9beb85ac4512970 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Wed, 7 May 2014 17:25:25 +0100 Subject: [PATCH] Test OAuthException --- tests/Exception/OAuthExceptionTest.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/Exception/OAuthExceptionTest.php diff --git a/tests/Exception/OAuthExceptionTest.php b/tests/Exception/OAuthExceptionTest.php new file mode 100644 index 00000000..be2d0e92 --- /dev/null +++ b/tests/Exception/OAuthExceptionTest.php @@ -0,0 +1,25 @@ +httpStatusCode = 400; + $this->assertSame($exception->getHttpHeaders(), ['HTTP/1.1 400 Bad Request']); + + $exception->httpStatusCode = 401; + $this->assertSame($exception->getHttpHeaders(), ['HTTP/1.1 401 Unauthorized']); + + $exception->httpStatusCode = 500; + $this->assertSame($exception->getHttpHeaders(), ['HTTP/1.1 500 Internal Server Error']); + + $exception->httpStatusCode = 501; + $this->assertSame($exception->getHttpHeaders(), ['HTTP/1.1 501 Not Implemented']); + } +}