Skip to content

Commit

Permalink
ACMS-3658: Added debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalkhode1 committed Mar 22, 2024
1 parent a7e2be9 commit 9b8ce64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Helpers/EnvironmentDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ public static function getSiteName(string $site_path): ?string {
if (self::isAcsfEnv()) {
return self::getAcsfDbName();
}
if ($site_path == "sites/site1") {
dump("isAcsfInited: " . self::isAcsfInited());
dump("isLocalEnv: " . self::isLocalEnv());
dump("isPantheonEnv: " . self::isPantheonEnv());
dump("isCiEnv: " . self::isCiEnv());
dump("FileExist: " . file_exists(DRUPAL_ROOT . "/sites/g"));
}
if (self::isAcsfInited() && self::isLocalEnv()) {
global $argv;

Expand Down
1 change: 1 addition & 0 deletions tests/src/Functional/Helpers/EnvironmentDetectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ public function testGetSiteNameForLocalAcsf(): void {
putenv("HTTP_HOST=localhost.acms");
$host_updated = TRUE;
}
dump("Http_HOST: " . getenv("HTTP_HOST"));
$this->assertEquals("acms", EnvironmentDetector::getSiteName("sites/site1"));
if ($ci_updated) {
putenv("CI=true");
Expand Down

0 comments on commit 9b8ce64

Please sign in to comment.