Commit b7baced1 authored by xjm's avatar xjm
Browse files

Issue #3138787 by mohrerao, sja112: Fix "response" relevant typos in core

(cherry picked from commit dfba06e7)
parent 5a811522
......@@ -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');
......@@ -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.');
......@@ -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.');
}
......
......@@ -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');
}
......@@ -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');
}
......
......@@ -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'
......@@ -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'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment