Skip to content

Commit f28cf8a

Browse files
authored
Merge pull request #19 from SoapBox/bugfix/fix-failing-tests
[Bugfix] Update the test to Include Microseconds in the timestamp
2 parents 4ce1c9d + 57e63e3 commit f28cf8a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: php
22

33
php:
44
- 7.1
5+
- 7.2
56

67
before_script: composer install
78

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)