Skip to content

Commit

Permalink
Fix CS and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteel committed Mar 29, 2021
1 parent 7ca27dc commit 7dd3c4e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 0.5.3 - 2021-03-29

### Added

- Nothing.

### Changed

- Nothing.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- [#15](https://github.com/netglue/primo/pull/15) fixes [#14](https://github.com/netglue/primo/issues/14).
When a route provides a document type _and_ an identifier, use that identifier to narrow down the result set to
a single document.

## 0.5.2 - 2021-03-25

### Added
Expand Down
8 changes: 5 additions & 3 deletions test/Unit/Router/DocumentResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function testAnExceptionIsThrownWhenAResultSetContainsMultipleResults():
$this->resolver->resolve($result);
}

public function testThatWhenTheTypeAndIdentifierArePresentInRoutingParametersTheIsWillBeUsedToResolveADocument() : void
public function testThatWhenTheTypeAndIdentifierArePresentInRoutingParametersTheIsWillBeUsedToResolveADocument(): void
{
$document = $this->createMock(Document::class);
$query = $this->createMock(Query::class);
Expand All @@ -236,13 +236,15 @@ public function testThatWhenTheTypeAndIdentifierArePresentInRoutingParametersThe

$query->expects(self::once())
->method('query')
->with(self::callback(function ($arg) {
->with(self::callback(static function ($arg): bool {
$expect = (string) Predicate::at('document.type', 'type');
self::assertEquals($expect, (string) $arg);

return true;
}), self::callback(function ($arg) {
}), self::callback(static function ($arg): bool {
$expect = (string) Predicate::at('document.id', 'my-id');
self::assertEquals($expect, (string) $arg);

return true;
}))
->willReturnSelf();
Expand Down

0 comments on commit 7dd3c4e

Please sign in to comment.