Skip to content

Commit

Permalink
Add test for clampMinMax function
Browse files Browse the repository at this point in the history
The commit introduces a new test for the `clampMinMax` function in `ClampTest.php`. This function test ensures the correct behavior when minimum and maximum values are specified.
  • Loading branch information
renfordt committed Apr 14, 2024
1 parent 76356b0 commit 387916b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ClampTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,12 @@ public function testClamp($value, $min, $max, $expected): void
{
$this->assertSame($expected, clamp($value, $min, $max));
}

/**
* @dataProvider dataProviderForClampTest
*/
public function testClampMinMax($value, $min, $max, $expected): void
{
$this->assertSame($expected, clampMinMax($value, $min, $max));
}
}

0 comments on commit 387916b

Please # to comment.