Skip to content

Commit cf0c7f4

Browse files
committed
fix: corrected test bootstrapping
1 parent c305713 commit cf0c7f4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

phpmyfaq/src/phpMyFAQ/Setup/Installer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ public function startInstall(array|null $setup = null): void
10831083
$configuration->add($name, $value);
10841084
}
10851085

1086-
$configuration->update(['main.referenceURL' => $link->getSystemUri('/setup/index.php')]);
1086+
$configuration->update(['main.referenceURL' => $setup['mainUrl'] ?? $link->getSystemUri('/setup/index.php')]);
10871087
$configuration->add('security.salt', md5($configuration->getDefaultUrl()));
10881088

10891089
// add an admin account and rights

tests/bootstrap.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
const IS_VALID_PHPMYFAQ = true;
4040
const DEBUG = true;
4141

42-
$_SERVER['HTTP_HOST'] = 'https://localhost/phpmyfaq-test/';
43-
$_SERVER['SERVER_NAME'] = 'https://localhost/phpmyfaq-test/';
42+
$_SERVER['HTTP_HOST'] = 'https://localhost/';
43+
$_SERVER['SERVER_NAME'] = 'https://localhost/';
4444

4545
require PMF_ROOT_DIR . '/content/core/config/constants.php';
4646

@@ -78,7 +78,8 @@
7878
'loginname' => 'admin',
7979
'password' => 'password',
8080
'password_retyped' => 'password',
81-
'rootDir' => PMF_TEST_DIR
81+
'rootDir' => PMF_TEST_DIR,
82+
'mainUrl' => 'https://localhost/',
8283
];
8384

8485
Strings::init();

0 commit comments

Comments
 (0)