Skip to content

Commit

Permalink
Issue #3138787 by mohrerao, sja112: Fix "response" relevant typos in …
Browse files Browse the repository at this point in the history
…core

(cherry picked from commit dfba06e7264251e3b48c9ec0ff9fac0dc97f8c02)
  • Loading branch information
xjm committed May 29, 2020
1 parent f203808 commit 54f67fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions modules/page_cache/tests/src/Functional/PageCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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-response');
$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-response');
$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');

Expand All @@ -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-response');
$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-response');
$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.');

Expand All @@ -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-response');
$this->assertNull($this->drupalGetHeader('X-Drupal-Cache'), 'Drupal page cache header not found.');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 respondWithResponse(Request $request) {
return new Response('test');
}

Expand All @@ -297,7 +297,7 @@ public function respondWithPublicResponse() {
/**
* A simple page callback that uses a CacheableResponse object.
*/
public function respondWithCacheableReponse(Request $request) {
public function respondWithCacheableResponse(Request $request) {
return new CacheableResponse('test');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-response'
defaults:
_controller: '\Drupal\system_test\Controller\SystemTestController::respondWithReponse'
_controller: '\Drupal\system_test\Controller\SystemTestController::respondWithResponse'
requirements:
_access: 'TRUE'

Expand All @@ -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-response'
defaults:
_controller: '\Drupal\system_test\Controller\SystemTestController::respondWithCacheableReponse'
_controller: '\Drupal\system_test\Controller\SystemTestController::respondWithCacheableResponse'
requirements:
_access: 'TRUE'

Expand Down

0 comments on commit 54f67fe

Please sign in to comment.