Skip to content

Commit 57e63e3

Browse files
committed
Update the tests to provide the correct time format
When the tests were originally created the generated signatures used a microprecision time. For some reason the time being returned now no longer has microprecision by default, so we've updated the format to return it.
1 parent 02f5ab6 commit 57e63e3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/Requests/VerifierTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function makeSignedRequest($id, array $headers = [], string $content =
8080
$files = [];
8181
$server = array_merge([
8282
'HTTP_X-SIGNED-ID' => $id,
83-
'HTTP_X-SIGNED-TIMESTAMP' => Carbon::parse('2017-10-10 12:00:00')
83+
'HTTP_X-SIGNED-TIMESTAMP' => Carbon::parse('2017-10-10 12:00:00')->format('Y-m-d H:i:s.u')
8484
], $headers);
8585

8686
$request = Request::create(
@@ -283,8 +283,7 @@ public function get_id_should_return_the_x_signed_id_value()
283283
*/
284284
public function get_content_returns_the_raw_content_if_it_is_not_valid_json()
285285
{
286-
$request = new class() extends Request
287-
{
286+
$request = new class() extends Request {
288287
public function getContent($asResource = false)
289288
{
290289
return '"url":"http:\\/\\/google.com"';
@@ -301,8 +300,7 @@ public function getContent($asResource = false)
301300
*/
302301
public function get_content_returns_the_content_from_the_request_without_escaping_the_slashes_if_the_content_is_valid_json()
303302
{
304-
$request = new class() extends Request
305-
{
303+
$request = new class() extends Request {
306304
public function getContent($asResource = false)
307305
{
308306
return '{"url":"http:\\/\\/google.com"}';

0 commit comments

Comments
 (0)