|
13 | 13 | namespace chillerlan\OAuthTest\API; |
14 | 14 |
|
15 | 15 | use chillerlan\DotEnv\DotEnv; |
16 | | -use chillerlan\HTTP\{CurlClient, HTTPOptionsTrait, Psr7}; |
| 16 | +use chillerlan\HTTP\{CurlClient, Psr7}; |
17 | 17 | use chillerlan\Logger\{Log, LogOptionsTrait, Output\LogOutputAbstract}; |
18 | | -use chillerlan\OAuth\{OAuthOptionsTrait, Core\AccessToken, Core\OAuthInterface, Storage\MemoryStorage}; |
19 | | -use chillerlan\Settings\{SettingsContainerAbstract, SettingsContainerInterface}; |
| 18 | +use chillerlan\OAuth\{OAuthOptions, Core\AccessToken, Core\OAuthInterface, Storage\MemoryStorage}; |
| 19 | +use chillerlan\Settings\SettingsContainerInterface; |
20 | 20 | use Http\Client\HttpClient; |
21 | 21 | use PHPUnit\Framework\TestCase; |
22 | 22 | use Psr\Http\Message\{RequestInterface, ResponseInterface}; |
@@ -84,8 +84,8 @@ protected function setUp(){ |
84 | 84 | 'minLogLevel' => 'debug', |
85 | 85 | ]; |
86 | 86 |
|
87 | | - $options = new class($options) extends SettingsContainerAbstract{ |
88 | | - use OAuthOptionsTrait, HTTPOptionsTrait, LogOptionsTrait; |
| 87 | + $options = new class($options) extends OAuthOptions{ |
| 88 | + use LogOptionsTrait; |
89 | 89 | protected $sleep; |
90 | 90 | }; |
91 | 91 |
|
@@ -114,7 +114,7 @@ protected function initLog($options):LoggerInterface{ |
114 | 114 | new class($options) extends LogOutputAbstract{ |
115 | 115 |
|
116 | 116 | protected function __log(string $level, string $message, array $context = null):void{ |
117 | | - echo $message;//.PHP_EOL.print_r($context, true).PHP_EOL; |
| 117 | + echo PHP_EOL.$message.PHP_EOL.print_r($context, true).PHP_EOL; |
118 | 118 | } |
119 | 119 |
|
120 | 120 | }, |
@@ -147,7 +147,7 @@ public function sendRequest(RequestInterface $request):ResponseInterface{ |
147 | 147 |
|
148 | 148 | $response = $this->client->sendRequest($request); |
149 | 149 |
|
150 | | - $this->logger->debug("\n-----REQUEST-----\n".Psr7\message_to_string($request)); |
| 150 | + $this->logger->debug("\n-----REQUEST------\n".Psr7\message_to_string($request)); |
151 | 151 | $this->logger->debug("\n-----RESPONSE-----\n".Psr7\message_to_string($response)); |
152 | 152 |
|
153 | 153 | $response->getBody()->rewind(); |
|
0 commit comments