diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c1b779..cc7bab3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/spec/Analytics/ReportSpec.php b/spec/Analytics/ReportSpec.php index c7e41d8..48fa4ba 100644 --- a/spec/Analytics/ReportSpec.php +++ b/spec/Analytics/ReportSpec.php @@ -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) diff --git a/src/Model/PaginatedListGenerator.php b/src/Model/PaginatedListGenerator.php index 5a76940..acb2e2a 100644 --- a/src/Model/PaginatedListGenerator.php +++ b/src/Model/PaginatedListGenerator.php @@ -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'); + } } /**