Skip to content

Commit

Permalink
Merge pull request #49 from oat-sa/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
emgolubev committed Oct 28, 2021
2 parents 1e26b5d + d6e0f78 commit 0a4b426
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
=========

1.3.0
-----

* Added `milliseconds` to timestamp in `Score` JSON output

1.2.0
-----

Expand Down
2 changes: 1 addition & 1 deletion src/Model/Score/Score.php
Expand Up @@ -225,7 +225,7 @@ public function jsonSerialize(): array
'scoreGiven' => $this->scoreGiven,
'scoreMaximum' => $this->scoreMaximum,
'comment' => $this->comment,
'timestamp' => $this->timestamp->format(DateTimeInterface::ATOM),
'timestamp' => $this->timestamp->format(DateTimeInterface::RFC3339_EXTENDED),
]
),
static function ($value): bool {
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/Model/Score/ScoreTest.php
Expand Up @@ -73,7 +73,7 @@ public function testDefaults(): void
'userId' => 'scoreUserIdentifier',
'activityProgress' => ScoreInterface::ACTIVITY_PROGRESS_STATUS_INITIALIZED,
'gradingProgress' => ScoreInterface::GRADING_PROGRESS_STATUS_NOT_READY,
'timestamp' => $this->now->format(DateTimeInterface::ATOM),
'timestamp' => $this->now->format(DateTimeInterface::RFC3339_EXTENDED),
],
$this->subject->jsonSerialize()
);
Expand Down Expand Up @@ -168,7 +168,7 @@ public function testJsonSerialize(): void
'scoreGiven' => (float)10,
'scoreMaximum' => (float)100,
'comment' => 'scoreComment',
'timestamp' => $this->now->format(DateTimeInterface::ATOM),
'timestamp' => $this->now->format(DateTimeInterface::RFC3339_EXTENDED),
'key' => 'value'
],
$subject->jsonSerialize()
Expand All @@ -191,7 +191,7 @@ public function testJsonSerializeWithZeroValues(): void
'scoreGiven' => 0,
'scoreMaximum' => 0,
'comment' => 'scoreComment',
'timestamp' => $this->now->format(DateTimeInterface::ATOM),
'timestamp' => $this->now->format(DateTimeInterface::RFC3339_EXTENDED),
'key' => 'value'
],
$subject->jsonSerialize()
Expand Down

0 comments on commit 0a4b426

Please sign in to comment.