From c8979a48576ac7b5c15a9d3f6c30ea803397b79e Mon Sep 17 00:00:00 2001 From: Barnaby Walters Date: Wed, 9 Jun 2021 00:26:27 +0200 Subject: [PATCH] Excluded templates from test coverage, now up to 89% --- src/Callback/DefaultAuthorizationForm.php | 2 +- src/Callback/SingleUserPasswordAuthenticationCallback.php | 2 +- src/Server.php | 2 +- .../templates => templates}/default_authorization_page.html.php | 0 .../templates => templates}/default_exception_response.html.php | 0 .../single_user_password_authentication_form.html.php | 0 6 files changed, 3 insertions(+), 3 deletions(-) rename {src/templates => templates}/default_authorization_page.html.php (100%) rename {src/templates => templates}/default_exception_response.html.php (100%) rename {src/templates => templates}/single_user_password_authentication_form.html.php (100%) diff --git a/src/Callback/DefaultAuthorizationForm.php b/src/Callback/DefaultAuthorizationForm.php index 81f70d1..b07a2bf 100644 --- a/src/Callback/DefaultAuthorizationForm.php +++ b/src/Callback/DefaultAuthorizationForm.php @@ -20,7 +20,7 @@ class DefaultAuthorizationForm implements AuthorizationFormInterface, LoggerAwar public LoggerInterface $logger; public function __construct(?string $formTemplatePath=null, ?string $csrfKey=null, ?LoggerInterface $logger=null) { - $this->formTemplatePath = $formTemplatePath ?? __DIR__ . '/../templates/default_authorization_page.html.php'; + $this->formTemplatePath = $formTemplatePath ?? __DIR__ . '/../../templates/default_authorization_page.html.php'; $this->csrfKey = $csrfKey ?? \Taproot\IndieAuth\Server::DEFAULT_CSRF_KEY; $this->logger = $logger ?? new NullLogger; } diff --git a/src/Callback/SingleUserPasswordAuthenticationCallback.php b/src/Callback/SingleUserPasswordAuthenticationCallback.php index a699ec1..8e5256a 100644 --- a/src/Callback/SingleUserPasswordAuthenticationCallback.php +++ b/src/Callback/SingleUserPasswordAuthenticationCallback.php @@ -22,7 +22,7 @@ class SingleUserPasswordAuthenticationCallback { } $this->user = $user; $this->hashedPassword = $hashedPassword; - $this->formTemplate = $formTemplate ?? __DIR__ . '/../templates/single_user_password_authentication_form.html.php'; + $this->formTemplate = $formTemplate ?? __DIR__ . '/../../templates/single_user_password_authentication_form.html.php'; $this->csrfKey = $csrfKey ?? \Taproot\IndieAuth\Server::DEFAULT_CSRF_KEY; } diff --git a/src/Server.php b/src/Server.php index 11a1c85..eddee2a 100644 --- a/src/Server.php +++ b/src/Server.php @@ -69,7 +69,7 @@ class Server { 'accessTokenStorage' => null, 'httpGetWithEffectiveUrl' => null, 'authorizationForm' => new DefaultAuthorizationForm(), - 'exceptionTemplatePath' => __DIR__ . '/templates/default_exception_response.html.php', + 'exceptionTemplatePath' => __DIR__ . '/../templates/default_exception_response.html.php', 'tokenLength' => 64 ], $config); diff --git a/src/templates/default_authorization_page.html.php b/templates/default_authorization_page.html.php similarity index 100% rename from src/templates/default_authorization_page.html.php rename to templates/default_authorization_page.html.php diff --git a/src/templates/default_exception_response.html.php b/templates/default_exception_response.html.php similarity index 100% rename from src/templates/default_exception_response.html.php rename to templates/default_exception_response.html.php diff --git a/src/templates/single_user_password_authentication_form.html.php b/templates/single_user_password_authentication_form.html.php similarity index 100% rename from src/templates/single_user_password_authentication_form.html.php rename to templates/single_user_password_authentication_form.html.php