aerophant /
ramda
| 1 | <?php |
||
| 2 | namespace Aerophant\RamdaTest; |
||
| 3 | |||
| 4 | use function Aerophant\Ramda\multiply; |
||
| 5 | use function Aerophant\Ramda\partial; |
||
| 6 | use PHPUnit\Framework\TestCase; |
||
| 7 | |||
| 8 | class PartialTest extends TestCase |
||
| 9 | { |
||
| 10 | public function testPartial() |
||
| 11 | { |
||
| 12 | $double = partial(multiply(), [2]); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 13 | $arg = 10; |
||
| 14 | $expectedResult = 20; |
||
| 15 | $actualResult = $double($arg); |
||
| 16 | $this->assertEquals($expectedResult, $actualResult); |
||
| 17 | } |
||
| 18 | } |
||
| 19 |