From ad701f80eb0c230ef3316a885ad41bd7a9e4d26d Mon Sep 17 00:00:00 2001 From: davidbyoung Date: Thu, 22 Jun 2023 21:07:25 -0500 Subject: [PATCH] Added some more comments --- tests/Integration/Demo/Auth/IMockedAuthenticator.php | 2 ++ tests/Integration/Demo/Users/UserTest.php | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/Integration/Demo/Auth/IMockedAuthenticator.php b/tests/Integration/Demo/Auth/IMockedAuthenticator.php index 72c1027..79a3ee4 100644 --- a/tests/Integration/Demo/Auth/IMockedAuthenticator.php +++ b/tests/Integration/Demo/Auth/IMockedAuthenticator.php @@ -10,6 +10,8 @@ /** * Defines the interface for mocked authenticators to implement + * + * TODO: This should likely be refactored into Aphiria */ interface IMockedAuthenticator extends IAuthenticator { diff --git a/tests/Integration/Demo/Users/UserTest.php b/tests/Integration/Demo/Users/UserTest.php index dd8726b..5683dec 100644 --- a/tests/Integration/Demo/Users/UserTest.php +++ b/tests/Integration/Demo/Users/UserTest.php @@ -36,12 +36,8 @@ protected function setUp(): void Container::$globalInstance?->resolve(GlobalDatabaseSeeder::class)->seed(); $this->createTestingAuthenticator(); - /** - * TODO - * - * Should also create mockable IAuthority - * This should probably do some real work, eg looking up policy by name like the real one so that integration tests are slightly more realistic. This would require some refactoring to either an abstract class or an overridable Authority class. - */ + // TODO: Do I need a mockable authority? It would prevent us from having to set up roles and all, but I wonder if that's actually desirable. + // TODO: The reason we mocked authentication is because it's a pain to set up the request, whereas setting up a principal to have the proper roles feels like something we should really be testing here. } protected function tearDown(): void