Skip to content

Commit

Permalink
Updating comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed May 23, 2024
1 parent ab5ecca commit 44fef58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/phpunit/src/Misc/TelemetryHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ public function testGetEnvironmentProviderWithoutAnyEnvSet(): void {
* Test the getEnvironmentProvider method when Acquia environment is detected.
*/
public function testGetEnvironmentProviderWithAcquia(): void {
// We test this separately from testEnvironmentProvider() because AH_SITE_ENVIRONMENT isn't in
// TelemetryHelper::getProviders(). Instead, we rely on AcquiaDrupalEnvironmentDetector::getAhEnv() in
// getEnvironmentProvider() to indirectly tell us if AH_SITE_ENVIRONMENT is set. This allows
// AcquiaDrupalEnvironmentDetector to handle any changes to the logic of detecting Acquia environments.
TestBase::setEnvVars(['AH_SITE_ENVIRONMENT' => self::ENV_VAR_DEFAULT_VALUE]);

// We need to make sure our mocked method is used. Depending on the implementation,
// this could involve setting it statically or using dependency injection.
// Expect 'acquia' to be returned since Acquia environment is mocked to be present.
$this->assertEquals('acquia', TelemetryHelper::getEnvironmentProvider());
}

Expand Down

0 comments on commit 44fef58

Please sign in to comment.