11<?php
22
3+ namespace Picqer \Tests ;
4+
35use GuzzleHttp \Exception \BadResponseException ;
46use GuzzleHttp \Middleware ;
57use GuzzleHttp \Promise \PromiseInterface ;
68use GuzzleHttp \Psr7 ;
9+ use PHPUnit \Framework \TestCase ;
710use Picqer \Financials \Moneybird \Connection ;
811use Picqer \Financials \Moneybird \Entities \Contact ;
912use Picqer \Financials \Moneybird \Exceptions \Api \TooManyRequestsException ;
13+ use Picqer \Financials \Moneybird \Exceptions \ApiException ;
1014use Psr \Http \Message \RequestInterface ;
1115use Psr \Http \Message \ResponseInterface ;
1216
1519 *
1620 * Tests the connection for proper headers, authentication and other stuff
1721 */
18- class ConnectionTest extends \PHPUnit_Framework_TestCase
22+ class ConnectionTest extends TestCase
1923{
2024 /**
2125 * Container to hold the Guzzle history (by reference).
@@ -27,7 +31,7 @@ class ConnectionTest extends \PHPUnit_Framework_TestCase
2731 /**
2832 * @param callable[] $additionalMiddlewares
2933 *
30- * @return \Picqer\Financials\Moneybird\ Connection
34+ * @return Connection
3135 */
3236 private function getConnectionForTesting (array $ additionalMiddlewares = [])
3337 {
@@ -66,7 +70,7 @@ private function getRequestFromHistoryContainer($requestNumber = 0)
6670 }
6771
6872 /**
69- * @throws \Picqer\Financials\Moneybird\Exceptions\ ApiException
73+ * @throws ApiException
7074 */
7175 public function testClientIncludesAuthenticationHeader ()
7276 {
@@ -80,7 +84,7 @@ public function testClientIncludesAuthenticationHeader()
8084 }
8185
8286 /**
83- * @throws \Picqer\Financials\Moneybird\Exceptions\ ApiException
87+ * @throws ApiException
8488 */
8589 public function testClientIncludesJsonHeaders ()
8690 {
@@ -95,7 +99,7 @@ public function testClientIncludesJsonHeaders()
9599 }
96100
97101 /**
98- * @throws \Picqer\Financials\Moneybird\Exceptions\ ApiException
102+ * @throws ApiException
99103 */
100104 public function testClientTriesToGetAccessTokenWhenNoneGiven ()
101105 {
@@ -116,7 +120,7 @@ public function testClientTriesToGetAccessTokenWhenNoneGiven()
116120 }
117121
118122 /**
119- * @throws \Picqer\Financials\Moneybird\Exceptions\ ApiException
123+ * @throws ApiException
120124 */
121125 public function testClientContinuesWithRequestAfterGettingAccessTokenWhenNoneGiven ()
122126 {
@@ -131,7 +135,7 @@ public function testClientContinuesWithRequestAfterGettingAccessTokenWhenNoneGiv
131135 }
132136
133137 /**
134- * @throws \Picqer\Financials\Moneybird\Exceptions\ ApiException
138+ * @throws ApiException
135139 */
136140 public function testClientDetectsApiRateLimit ()
137141 {
0 commit comments