Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
8d114ca4
Commit
8d114ca4
authored
15 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#648268
by boombatower: allow run-tests.sh to work with https.
parent
20dbb2f2
Loading
Loading
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/run-tests.sh
+15
-1
15 additions, 1 deletion
scripts/run-tests.sh
with
15 additions
and
1 deletion
scripts/run-tests.sh
+
15
−
1
View file @
8d114ca4
...
...
@@ -117,7 +117,8 @@ function simpletest_script_help() {
--url
Immediately preceeds a URL to
set
the host and path. You will
need this parameter
if
Drupal is
in
a subdirectory on your
localhost and you have not
set
\$
base_url
in
settings.php.
localhost and you have not
set
\$
base_url
in
settings.php. Tests
can be run under SSL by including https://
in
the URL.
--php
The absolute path to the PHP executable. Usually not needed.
...
...
@@ -264,6 +265,12 @@ function simpletest_script_init($server_software) {
$parsed_url
=
parse_url
(
$args
[
'url'
])
;
$host
=
$parsed_url
[
'host'
]
.
(
isset
(
$parsed_url
[
'port'
])
?
':'
.
$parsed_url
[
'port'
]
:
''
)
;
$path
=
$parsed_url
[
'path'
]
;
// If the passed URL schema is
'https'
then
setup the
$_SERVER
variables
// properly so that testing will run under https.
if
(
$parsed_url
[
'scheme'
]
==
'https'
)
{
$_SERVER
[
'HTTPS'
]
=
'on'
;
}
}
$_SERVER
[
'HTTP_HOST'
]
=
$host
;
...
...
@@ -277,6 +284,13 @@ function simpletest_script_init($server_software) {
$_SERVER
[
'PHP_SELF'
]
=
$path
.
'/index.php'
;
$_SERVER
[
'HTTP_USER_AGENT'
]
=
'Drupal command line'
;
if
(
$_SERVER
[
'HTTPS'
]
==
'on'
)
{
// Ensure that any and all environment variables are changed to https://.
foreach
(
$_SERVER
as
$key
=>
$value
)
{
$_SERVER
[
$key
]
=
str_replace
(
'http://'
,
'https://'
,
$_SERVER
[
$key
])
;
}
}
chdir
(
realpath
(
dirname
(
__FILE__
)
.
'/..'
))
;
define
(
'DRUPAL_ROOT'
, getcwd
())
;
require_once DRUPAL_ROOT
.
'/includes/bootstrap.inc'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment