From 335054c9a304e718bfe364c13aa22d016ea40b47 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sun, 26 Jan 2025 23:38:07 +0100 Subject: [PATCH] Move and rename Guzzle\AuthenticatorSubscriber to HttpClient\Authenticator --- app/config/services.yml | 2 +- .../Authenticator.php} | 4 ++-- .../AuthenticatorTest.php} | 20 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) rename src/{Guzzle/AuthenticatorSubscriber.php => HttpClient/Authenticator.php} (96%) rename tests/{Guzzle/AuthenticatorSubscriberTest.php => HttpClient/AuthenticatorTest.php} (93%) diff --git a/app/config/services.yml b/app/config/services.yml index 662a858ef..61e628225 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -220,7 +220,7 @@ services: Wallabag\Helper\HttpClientFactory: calls: - - ['addSubscriber', ['@Wallabag\Guzzle\AuthenticatorSubscriber']] + - ['addSubscriber', ['@Wallabag\HttpClient\Authenticator']] RulerZ\RulerZ: alias: rulerz diff --git a/src/Guzzle/AuthenticatorSubscriber.php b/src/HttpClient/Authenticator.php similarity index 96% rename from src/Guzzle/AuthenticatorSubscriber.php rename to src/HttpClient/Authenticator.php index 4b565076e..4b649af79 100644 --- a/src/Guzzle/AuthenticatorSubscriber.php +++ b/src/HttpClient/Authenticator.php @@ -1,6 +1,6 @@ disableOriginalConstructor() ->getMock(); - $subscriber = new AuthenticatorSubscriber( + $subscriber = new Authenticator( new ArraySiteConfigBuilder(), $authenticator ); @@ -43,7 +43,7 @@ class AuthenticatorSubscriberTest extends TestCase ->getMock(); $builder = new ArraySiteConfigBuilder(['example.com' => []]); - $subscriber = new AuthenticatorSubscriber($builder, $authenticator); + $subscriber = new Authenticator($builder, $authenticator); $logger = new Logger('foo'); $handler = new TestHandler(); @@ -83,7 +83,7 @@ class AuthenticatorSubscriberTest extends TestCase ->method('login'); $builder = new ArraySiteConfigBuilder(['example.com' => ['requiresLogin' => true]]); - $subscriber = new AuthenticatorSubscriber($builder, $authenticator); + $subscriber = new Authenticator($builder, $authenticator); $logger = new Logger('foo'); $handler = new TestHandler(); @@ -128,7 +128,7 @@ class AuthenticatorSubscriberTest extends TestCase ->getMock(); $builder = new ArraySiteConfigBuilder(['example.com' => []]); - $subscriber = new AuthenticatorSubscriber($builder, $authenticator); + $subscriber = new Authenticator($builder, $authenticator); $logger = new Logger('foo'); $handler = new TestHandler(); @@ -168,7 +168,7 @@ class AuthenticatorSubscriberTest extends TestCase 'requiresLogin' => true, 'notLoggedInXpath' => '//html', ]]); - $subscriber = new AuthenticatorSubscriber($builder, $authenticator); + $subscriber = new Authenticator($builder, $authenticator); $logger = new Logger('foo'); $handler = new TestHandler(); @@ -220,7 +220,7 @@ class AuthenticatorSubscriberTest extends TestCase 'requiresLogin' => true, 'notLoggedInXpath' => '//html', ]]); - $subscriber = new AuthenticatorSubscriber($builder, $authenticator); + $subscriber = new Authenticator($builder, $authenticator); $logger = new Logger('foo'); $handler = new TestHandler(); @@ -271,7 +271,7 @@ class AuthenticatorSubscriberTest extends TestCase 'requiresLogin' => true, 'notLoggedInXpath' => '//html', ]]); - $subscriber = new AuthenticatorSubscriber($builder, $authenticator); + $subscriber = new Authenticator($builder, $authenticator); $logger = new Logger('foo'); $handler = new TestHandler();