Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Apr 29, 2023
1 parent acb05e9 commit 6ce63c8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/CountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,20 @@ public function testCountValues(): void

public function testRunningCount(): void
{
$countEvent = 1;
$countEven = 1;

$pipeline = map(fn () => yield from range(0, 100))
->runningCount($countAll)
->filter(fn (int $n) => $n % 2)
->runningCount($countEvent)
->runningCount($countEven)
->filter(fn (int $n) => $n % 3);

$this->assertSame(0, $countAll);
$this->assertSame(1, $countEvent);
$this->assertSame(1, $countEven);

$this->assertSame(33, $pipeline->count());

$this->assertSame(101, $countAll);
$this->assertSame(50, $countEvent - 1);
$this->assertSame(50, $countEven - 1);
}
}

0 comments on commit 6ce63c8

Please sign in to comment.