summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/jsonapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/jsonapi')
-rw-r--r--core/modules/jsonapi/src/JsonApiResource/ResourceObject.php2
-rw-r--r--core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php12
-rw-r--r--core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php4
3 files changed, 9 insertions, 9 deletions
diff --git a/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php b/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php
index 6d4cc6ce55f..6564f2b3401 100644
--- a/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php
+++ b/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php
@@ -98,7 +98,7 @@ class ResourceObject implements CacheableDependencyInterface, ResourceIdentifier
$this->links = $links->withContext($this);
// If the specified language empty it falls back the same way as in the
- // entity system
+ // entity system.
// @see \Drupal\Core\Entity\EntityBase::language()
$this->language = $language ?: new Language(['id' => LanguageInterface::LANGCODE_NOT_SPECIFIED]);
}
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
index 199b27d308f..12aa5eeec52 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
@@ -584,7 +584,7 @@ class JsonApiFunctionalTest extends JsonApiFunctionalTestBase {
'resource_meta_title' => $node->getTitle(),
];
$this->assertEquals($expectedMeta, $result['data']['meta']);
- // Test if the cache tags bubbled up
+ // Test if the cache tags bubbled up.
$this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'jsonapi_test_meta_events.object_meta');
$this->assertSession()->responseHeaderContains('X-Drupal-Cache-Contexts', 'user.roles');
@@ -602,11 +602,11 @@ class JsonApiFunctionalTest extends JsonApiFunctionalTestBase {
}
- // Test if the cache tags bubbled up
+ // Test if the cache tags bubbled up.
$this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'jsonapi_test_meta_events.object_meta');
$this->assertSession()->responseHeaderContains('X-Drupal-Cache-Contexts', 'user.roles');
- // Now try the same requests with a superuser, see if we get other caches
+ // Now try the same requests with a superuser, see if we get other caches.
$this->mink->resetSessions();
$this->drupalResetSession();
$this->drupalLogin($this->adminUser);
@@ -674,7 +674,7 @@ class JsonApiFunctionalTest extends JsonApiFunctionalTestBase {
// Test if the cache tags bubbled up.
$this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'jsonapi_test_meta_events.relationship_meta');
- // Test if relationship has correct metadata when loading a single resource
+ // Test if relationship has correct metadata when loading a single resource.
$resource = Json::decode($this->drupalGet('jsonapi/node/article/' . $node->uuid()));
if ($resource['data']['id'] === $node->uuid()) {
$tagNames = $resource['data']['relationships']['field_tags']['meta']['relationship_meta_name'];
@@ -687,7 +687,7 @@ class JsonApiFunctionalTest extends JsonApiFunctionalTestBase {
}
- // Test if the cache tags bubbled up
+ // Test if the cache tags bubbled up.
$this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'jsonapi_test_meta_events.relationship_meta');
}
@@ -706,7 +706,7 @@ class JsonApiFunctionalTest extends JsonApiFunctionalTestBase {
'fields' => ['name'],
]);
- // Test if relationship has correct metadata when loading a single resource
+ // Test if relationship has correct metadata when loading a single resource.
$str = $this->drupalGet('jsonapi/node/article/' . $node->uuid() . '/relationships/field_tags');
$resource = Json::decode($str);
diff --git a/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php b/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php
index d9cda8df404..4f609de47a7 100644
--- a/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php
@@ -131,7 +131,7 @@ class ResourceObjectNormalizerCacherTest extends KernelTestBase {
$this->installEntitySchema('entity_test_computed_field');
// Use EntityTestComputedField since ComputedTestCacheableStringItemList has
- // a max age of 800
+ // a max age of 800.
$baseMaxAge = 800;
$entity = EntityTestComputedField::create([]);
$entity->save();
@@ -149,7 +149,7 @@ class ResourceObjectNormalizerCacherTest extends KernelTestBase {
$event = new TerminateEvent($http_kernel->reveal(), $request->reveal(), $response->reveal());
$this->cacher->onTerminate($event);
- // Change request time to 500 seconds later
+ // Change request time to 500 seconds later.
$current_request = \Drupal::requestStack()->getCurrentRequest();
$current_request->server->set('REQUEST_TIME', $current_request->server->get('REQUEST_TIME') + 500);
$resource_normalization = $this->serializer