Skip to content

Commit

Permalink
Fix Report generator
Browse files Browse the repository at this point in the history
  • Loading branch information
danmichaelo committed May 13, 2020
1 parent 189c541 commit 5e906c0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

(Nothing yet)

## [0.9.1] - 2020-05-13

### Fixed

- Fixed generator introduced in 0.9.0.

## [0.9.0] - 2020-05-13

### Changed
Expand Down
2 changes: 1 addition & 1 deletion spec/Analytics/ReportSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function it_supports_resumption(Client $almaClient)
SpecHelper::getDummyData('analytics_response_part3.xml')
);

$this->count()->shouldBe(150 + 150 + 88);
$this->shouldHaveCount(150 + 150 + 88);
}

public function it_might_not_exist(Client $almaClient)
Expand Down
4 changes: 3 additions & 1 deletion src/Model/PaginatedListGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ trait PaginatedListGenerator
*/
public function rewind()
{
throw new \Exception('Cannot rewind a generator that was already run');
if ($this->position > 0) {
throw new \Exception('Cannot rewind a generator that was already run');
}
}

/**
Expand Down

0 comments on commit 5e906c0

Please sign in to comment.