Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
288
Merge Requests
288
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
dfba06e7
Commit
dfba06e7
authored
May 29, 2020
by
xjm
3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3138787
by mohrerao, sja112: Fix "response" relevant typos in core
parent
81e9500d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
core/modules/page_cache/tests/src/Functional/PageCacheTest.php
...modules/page_cache/tests/src/Functional/PageCacheTest.php
+5
-5
core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php
...dules/system_test/src/Controller/SystemTestController.php
+2
-2
core/modules/system/tests/modules/system_test/system_test.routing.yml
.../system/tests/modules/system_test/system_test.routing.yml
+4
-4
No files found.
core/modules/page_cache/tests/src/Functional/PageCacheTest.php
View file @
dfba06e7
...
...
@@ -501,12 +501,12 @@ public function testCacheableResponseResponses() {
$config
->
save
();
// GET a URL, which would be marked as a cache miss if it were cacheable.
$this
->
drupalGet
(
'/system-test/respond-reponse'
);
$this
->
drupalGet
(
'/system-test/respond-re
s
ponse'
);
$this
->
assertNull
(
$this
->
drupalGetHeader
(
'X-Drupal-Cache'
),
'Drupal page cache header not found.'
);
$this
->
assertEqual
(
$this
->
drupalGetHeader
(
'Cache-Control'
),
'must-revalidate, no-cache, private'
,
'Cache-Control header was sent'
);
// GET it again, verify it's still not cached.
$this
->
drupalGet
(
'/system-test/respond-reponse'
);
$this
->
drupalGet
(
'/system-test/respond-re
s
ponse'
);
$this
->
assertNull
(
$this
->
drupalGetHeader
(
'X-Drupal-Cache'
),
'Drupal page cache header not found.'
);
$this
->
assertEqual
(
$this
->
drupalGetHeader
(
'Cache-Control'
),
'must-revalidate, no-cache, private'
,
'Cache-Control header was sent'
);
...
...
@@ -521,12 +521,12 @@ public function testCacheableResponseResponses() {
$this
->
assertEqual
(
$this
->
drupalGetHeader
(
'Cache-Control'
),
'max-age=60, public'
,
'Cache-Control header was sent'
);
// GET a URL, which should be marked as a cache miss.
$this
->
drupalGet
(
'/system-test/respond-cacheable-reponse'
);
$this
->
drupalGet
(
'/system-test/respond-cacheable-re
s
ponse'
);
$this
->
assertEqual
(
$this
->
drupalGetHeader
(
'X-Drupal-Cache'
),
'MISS'
,
'Page was not cached.'
);
$this
->
assertEqual
(
$this
->
drupalGetHeader
(
'Cache-Control'
),
'max-age=300, public'
,
'Cache-Control header was sent.'
);
// GET it again, it should now be a cache hit.
$this
->
drupalGet
(
'/system-test/respond-cacheable-reponse'
);
$this
->
drupalGet
(
'/system-test/respond-cacheable-re
s
ponse'
);
$this
->
assertEqual
(
$this
->
drupalGetHeader
(
'X-Drupal-Cache'
),
'HIT'
,
'Page was cached.'
);
$this
->
assertEqual
(
$this
->
drupalGetHeader
(
'Cache-Control'
),
'max-age=300, public'
,
'Cache-Control header was sent.'
);
...
...
@@ -536,7 +536,7 @@ public function testCacheableResponseResponses() {
->
uninstall
([
'page_cache'
]);
// GET a URL that was cached by Page Cache before, it should not be now.
$this
->
drupalGet
(
'/respond-cacheable-reponse'
);
$this
->
drupalGet
(
'/respond-cacheable-re
s
ponse'
);
$this
->
assertNull
(
$this
->
drupalGetHeader
(
'X-Drupal-Cache'
),
'Drupal page cache header not found.'
);
}
...
...
core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php
View file @
dfba06e7
...
...
@@ -283,7 +283,7 @@ public function setHeader(Request $request) {
/**
* A simple page callback that uses a plain Symfony response object.
*/
public
function
respondWithReponse
(
Request
$request
)
{
public
function
respondWithRe
s
ponse
(
Request
$request
)
{
return
new
Response
(
'test'
);
}
...
...
@@ -297,7 +297,7 @@ public function respondWithPublicResponse() {
/**
* A simple page callback that uses a CacheableResponse object.
*/
public
function
respondWithCacheableReponse
(
Request
$request
)
{
public
function
respondWithCacheableRe
s
ponse
(
Request
$request
)
{
return
new
CacheableResponse
(
'test'
);
}
...
...
core/modules/system/tests/modules/system_test/system_test.routing.yml
View file @
dfba06e7
...
...
@@ -131,9 +131,9 @@ system_test.permission_dependent_route_access:
_permission
:
'
pet
llamas'
system_test.respond_response
:
path
:
'
/system-test/respond-reponse'
path
:
'
/system-test/respond-re
s
ponse'
defaults
:
_controller
:
'
\Drupal\system_test\Controller\SystemTestController::respondWithReponse'
_controller
:
'
\Drupal\system_test\Controller\SystemTestController::respondWithRe
s
ponse'
requirements
:
_access
:
'
TRUE'
...
...
@@ -145,9 +145,9 @@ system_test.respond_public_response:
_access
:
'
TRUE'
system_test.respond_cacheable_response
:
path
:
'
/system-test/respond-cacheable-reponse'
path
:
'
/system-test/respond-cacheable-re
s
ponse'
defaults
:
_controller
:
'
\Drupal\system_test\Controller\SystemTestController::respondWithCacheableReponse'
_controller
:
'
\Drupal\system_test\Controller\SystemTestController::respondWithCacheableRe
s
ponse'
requirements
:
_access
:
'
TRUE'
...
...
xjm
@xjm
mentioned in commit
b7baced1
·
May 29, 2020
mentioned in commit
b7baced1
mentioned in commit b7baced17901cf5bba85ae4964172c91fe4c89dd
Toggle commit list
xjm
@xjm
mentioned in commit
324d64d3
·
May 29, 2020
mentioned in commit
324d64d3
mentioned in commit 324d64d3d4cddd99f68b540905fdc031048c6f34
Toggle commit list
xjm
@xjm
mentioned in commit
1f7a4160
·
May 29, 2020
mentioned in commit
1f7a4160
mentioned in commit 1f7a4160a73266b9dd5f5ee4c3e086ed96cab50c
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment