Skip to content

Commit b3aa773

Browse files
Merge pull request #18 from bayareawebpro/dev
refactoring
2 parents b5c0c94 + 4487e57 commit b3aa773

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tests/LazyGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static function make(int $total, \Closure $callback): LazyCollection
1515
$faker = app(\Faker\Generator::class);
1616
$count = 0;
1717
return LazyCollection::make(function () use (&$count, $total, $faker, $callback) {
18-
while ($count < $total) {
18+
while ($count <= $total) {
1919
$count++;
2020
yield $callback($faker);
2121
}

tests/Unit/DefaultTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
class DefaultTest extends TestCase
1919
{
20-
2120
private function getCollectionData($total = 1000): LazyCollection
2221
{
2322
return LazyGenerator::make($total, function (\Faker\Generator $faker) {
@@ -110,13 +109,12 @@ public function test_can_download_streams()
110109

111110
$this->assertInstanceOf(StreamedResponse::class, $response);
112111

113-
//Capture Streamed Output...
114112
ob_start();
115113
$response->sendContent();
116114
$data = (string)ob_get_clean();
117-
//Capture Streamed Output...
118115

119116
$this->assertNotEmpty($data);
117+
120118
foreach ($items as $item) {
121119
$this->assertStringContainsString($item['email'], $data);
122120
}

0 commit comments

Comments
 (0)