feat: NetatmoClient with token rotation, OpenMeteoClient, LiveSource, netatmo-init
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Weerscherm\Tests;
|
||||
|
||||
use Weerscherm\HttpClient;
|
||||
use Weerscherm\HttpResponse;
|
||||
use Weerscherm\TokenStore;
|
||||
|
||||
/** Basis om in een test gedrag rond een FakeHttp te hangen (bijvoorbeeld een ander proces nabootsen). */
|
||||
abstract class FakeHttpDecorator implements HttpClient
|
||||
{
|
||||
public function __construct(protected readonly FakeHttp $inner, protected readonly TokenStore $store)
|
||||
{
|
||||
}
|
||||
|
||||
public function get(string $url, array $query = [], array $headers = []): HttpResponse
|
||||
{
|
||||
return $this->inner->get($url, $query, $headers);
|
||||
}
|
||||
|
||||
public function postForm(string $url, array $fields): HttpResponse
|
||||
{
|
||||
return $this->inner->postForm($url, $fields);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user