core/modules/dblog/tests/src/Functional/DbLogResourceTest.php | 2 +- .../Functional/EntityResource/Media/MediaResourceTestBase.php | 10 ++++++++-- .../Functional/EntityResource/WorkspaceResourceTestBase.php | 10 ++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php index 0d46303..36ce50b 100644 --- a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php +++ b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php @@ -73,7 +73,7 @@ public function testWatchdog() { $this->setUpAuthorization('GET'); $response = $this->request('GET', $url, $request_options); - $this->assertResourceResponse(200, FALSE, $response, ['config:rest.resource.dblog', 'config:rest.settings', 'http_response'], ['user.permissions'], FALSE, 'MISS'); + $this->assertResourceResponse(200, FALSE, $response, ['config:rest.resource.dblog', 'http_response'], ['user.permissions'], FALSE, 'MISS'); $log = Json::decode((string) $response->getBody()); $this->assertEqual($log['wid'], $id, 'Log ID is correct.'); $this->assertEqual($log['type'], 'rest', 'Type of log message is correct.'); diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php index 127b3da..f46319a 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php @@ -413,10 +413,16 @@ protected function getExpectedNormalizedFileEntity() { ], ], 'created' => [ - $this->formatExpectedTimestampItemValues($file->getCreatedTime()), + [ + 'value' => (new \DateTime())->setTimestamp($file->getCreatedTime())->setTimezone(new \DateTimeZone('UTC'))->format(\DateTime::RFC3339), + 'format' => \DateTime::RFC3339, + ], ], 'changed' => [ - $this->formatExpectedTimestampItemValues($file->getChangedTime()), + [ + 'value' => (new \DateTime())->setTimestamp($file->getChangedTime())->setTimezone(new \DateTimeZone('UTC'))->format(\DateTime::RFC3339), + 'format' => \DateTime::RFC3339, + ], ], ]; } diff --git a/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php b/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php index 18ba2dd..8241483 100644 --- a/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php +++ b/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php @@ -87,10 +87,16 @@ protected function getExpectedNormalizedEntity() { $author = User::load($this->entity->getOwnerId()); return [ 'created' => [ - $this->formatExpectedTimestampItemValues((int) $this->entity->getCreatedTime()), + [ + 'value' => (new \DateTime())->setTimestamp((int) $this->entity->getCreatedTime())->setTimezone(new \DateTimeZone('UTC'))->format(\DateTime::RFC3339), + 'format' => \DateTime::RFC3339, + ], ], 'changed' => [ - $this->formatExpectedTimestampItemValues($this->entity->getChangedTime()), + [ + 'value' => (new \DateTime())->setTimestamp($this->entity->getChangedTime())->setTimezone(new \DateTimeZone('UTC'))->format(\DateTime::RFC3339), + 'format' => \DateTime::RFC3339, + ], ], 'id' => [ [