diff --git a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php index e4d88fc..2fb3a26 100644 --- a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php +++ b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php @@ -19,6 +19,8 @@ class AuthenticationCollectorTest extends UnitTestCase { /** + * Add test providers to the AuthenticationCollector and test various methods. + * * @covers ::addProvider * @covers ::getSortedProviders * @covers ::getProvider @@ -28,12 +30,12 @@ public function testAuthenticationCollector() { $providers = []; $global = []; $authentication_collector = new AuthenticationCollector(); - for ($i=0; $i<10; $i++) { + for ($i = 0; $i < 10; $i++) { $provider_id = $this->randomMachineName(); - $priority = rand(-100,100); + $priority = rand(-100, 100); $provider = new TestAuthenticationProvider($provider_id); $providers[$priority] = $provider; - $global[$provider_id] = rand(0,1) > 0.5; + $global[$provider_id] = rand(0, 1) > 0.5; $authentication_collector->addProvider($provider, $provider_id, $priority, $global[$provider_id]); } // Sort the $providers array by priority (highest number is lowest priority) @@ -50,6 +52,9 @@ public function testAuthenticationCollector() { } +/** + * A simple provider for unit testing AuthenticationCollector. + */ class TestAuthenticationProvider implements AuthenticationProviderInterface { /**