Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
🚿
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Mar 6, 2024
1 parent 10162fb commit 55d8213
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/Providers/OAuthAPITestAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function initStorage(SettingsContainerInterface $options):OAuthStorage
return new OAuthTestMemoryStorage($options, $this->CFG);
}

protected function initHttp(SettingsContainerInterface $options, LoggerInterface $logger, array $responses):ClientInterface{
protected function initHttp(SettingsContainerInterface $options, LoggerInterface $logger):ClientInterface{
return new OAuthTestHttpClient($this->CFG, $logger);
}

Expand Down
18 changes: 9 additions & 9 deletions tests/Providers/OAuthProviderTestAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ abstract class OAuthProviderTestAbstract extends TestCase{
protected bool $is_ci;

// PSR interfaces
protected ClientInterface $http;
protected LoggerInterface $logger;
protected ClientInterface $http;
protected LoggerInterface $logger;

// OAuth related properties
protected OAuthOptions|SettingsContainerInterface $options;
Expand All @@ -58,10 +58,10 @@ protected function setUp():void{
// init provider
$this->options = $this->initOptions();
$this->storage = $this->initStorage($this->options);
$this->http = $this->initHttp($this->options, $this->logger, $this::TEST_RESPONSES); // PSR-18 HTTP client
$this->http = $this->initHttp($this->options, $this->logger); // PSR-18 HTTP client
$this->provider = $this->initProvider($this->getProviderFQCN());

$this->initTestProperties($this::TEST_PROPERTIES);
$this->initTestProperties();
}

/**
Expand Down Expand Up @@ -97,8 +97,8 @@ protected function initStorage(SettingsContainerInterface $options):OAuthStorage
return new MemoryStorage($options);
}

protected function initHttp(SettingsContainerInterface $options, LoggerInterface $logger, array $responses):ClientInterface{
return new ProviderTestHttpClient($logger, $responses);
protected function initHttp(SettingsContainerInterface $options, LoggerInterface $logger):ClientInterface{
return new ProviderTestHttpClient($logger, $this::TEST_RESPONSES);
}

protected function initProvider(string $FQCN):OAuthInterface|OAuth1Interface|OAuth2Interface{
Expand All @@ -117,9 +117,9 @@ protected function initProvider(string $FQCN):OAuthInterface|OAuth1Interface|OAu
return $this->reflection->newInstanceArgs($args);
}

protected function initTestProperties(array $properties):void{
foreach($properties as $property => $value){
$this->reflection->getProperty($property)->setValue($this->provider, $value);
protected function initTestProperties():void{
foreach($this::TEST_PROPERTIES as $property => $value){
$this->setReflectionProperty($property, $value);
}
}

Expand Down

0 comments on commit 55d8213

Please sign in to comment.