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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
62cd6a85
Commit
62cd6a85
authored
Jan 14, 2014
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2170205
by Wim Leers: Minor clean-up of EditLoadingTest (discovered by backporting).
parent
c50ff11e
No related branches found
No related tags found
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php
+4
-4
4 additions, 4 deletions
core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php
with
4 additions
and
4 deletions
core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php
+
4
−
4
View file @
62cd6a85
...
...
@@ -189,8 +189,7 @@ public function testUserWithPermission() {
$this
->
assertIdentical
(
'<form '
,
Unicode
::
substr
(
$ajax_commands
[
0
][
'data'
],
0
,
6
),
'The editFieldForm command contains a form.'
);
// Prepare form values for submission. drupalPostAjaxForm() is not suitable
// for handling pages with JSON responses, so we need our own solution
// here.
// for handling pages with JSON responses, so we need our own solution here.
$form_tokens_found
=
preg_match
(
'/\sname="form_token" value="([^"]+)"/'
,
$ajax_commands
[
0
][
'data'
],
$token_match
)
&&
preg_match
(
'/\sname="form_build_id" value="([^"]+)"/'
,
$ajax_commands
[
0
][
'data'
],
$build_id_match
);
$this
->
assertTrue
(
$form_tokens_found
,
'Form tokens found in output.'
);
...
...
@@ -208,8 +207,8 @@ public function testUserWithPermission() {
);
$post
+=
$edit
+
$this
->
getAjaxPageStatePostData
();
// Submit field form and check response. This should store the
//
updated
entity in TempStore on the server.
// Submit field form and check response. This should store the
updated
// entity in TempStore on the server.
$response
=
$this
->
drupalPost
(
'edit/form/'
.
'node/1/body/und/full'
,
'application/vnd.drupal-ajax'
,
$post
);
$this
->
assertResponse
(
200
);
$ajax_commands
=
drupal_json_decode
(
$response
);
...
...
@@ -455,6 +454,7 @@ public function testConcurrentEdit() {
$post
=
array
(
'nocssjs'
=>
'true'
)
+
$this
->
getAjaxPageStatePostData
();
$response
=
$this
->
drupalPost
(
'edit/form/'
.
'node/1/body/und/full'
,
'application/vnd.drupal-ajax'
,
$post
);
$this
->
assertResponse
(
200
);
$ajax_commands
=
drupal_json_decode
(
$response
);
// Prepare form values for submission. drupalPostAJAX() is not suitable for
...
...
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