Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
redirect
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
redirect
Commits
88dd7cdf
Commit
88dd7cdf
authored
5 years ago
by
Arpad Rozsa
Committed by
Sascha Grossenbacher
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3100538
by arpad.rozsa: RedirectUITest fails in D8.8
parent
47026c15
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Functional/RedirectUITest.php
+12
-3
12 additions, 3 deletions
tests/src/Functional/RedirectUITest.php
with
12 additions
and
3 deletions
tests/src/Functional/RedirectUITest.php
+
12
−
3
View file @
88dd7cdf
...
...
@@ -115,16 +115,25 @@ class RedirectUITest extends BrowserTestBase {
// Test if the automatically created redirect works.
$this
->
assertRedirect
(
'term_test_alias'
,
'term_test_alias_updated'
);
if
(
version_compare
(
\Drupal
::
VERSION
,
'8.8'
,
'>='
))
{
$path_field
=
'path[0][value]'
;
$alias_field
=
'alias[0][value]'
;
}
else
{
$path_field
=
'source'
;
$alias_field
=
'alias'
;
}
// Test the path alias update via the admin path form.
$this
->
drupalPostForm
(
'admin/config/search/path/add'
,
[
'source'
=>
'/node'
,
'
alias
'
=>
'/aaa_path_alias'
,
$path_field
=>
'/node'
,
$
alias
_field
=>
'/aaa_path_alias'
,
],
t
(
'Save'
));
// Note that here we rely on fact that we land on the path alias list page
// and the default sort is by the alias, which implies that the first edit
// link leads to the edit page of the aaa_path_alias.
$this
->
clickLink
(
t
(
'Edit'
));
$this
->
drupalPostForm
(
NULL
,
[
'
alias
'
=>
'/aaa_path_alias_updated'
],
t
(
'Save'
));
$this
->
drupalPostForm
(
NULL
,
[
$
alias
_field
=>
'/aaa_path_alias_updated'
],
t
(
'Save'
));
$redirect
=
$this
->
repository
->
findMatchingRedirect
(
'aaa_path_alias'
,
[],
'en'
);
$this
->
assertEqual
(
$redirect
->
getRedirectUrl
()
->
toString
(),
Url
::
fromUri
(
'base:aaa_path_alias_updated'
)
->
toString
());
// Test if the automatically created redirect works.
...
...
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