@@ -6,15 +6,15 @@ |
||
| 6 | 6 | |
| 7 | 7 | class AppendTest extends TestCase |
| 8 | 8 | { |
| 9 | - public function testAppend() |
|
| 10 | - { |
|
| 9 | + public function testAppend() |
|
| 10 | + { |
|
| 11 | 11 | $result = append(3)([1, 2]); |
| 12 | 12 | $this->assertEquals([1, 2, 3], $result); |
| 13 | - } |
|
| 13 | + } |
|
| 14 | 14 | |
| 15 | - public function testAppendWithoutAutoCurry() |
|
| 16 | - { |
|
| 15 | + public function testAppendWithoutAutoCurry() |
|
| 16 | + { |
|
| 17 | 17 | $result = append(3, [1, 2]); |
| 18 | 18 | $this->assertEquals([1, 2, 3], $result); |
| 19 | - } |
|
| 19 | + } |
|
| 20 | 20 | } |
@@ -6,12 +6,12 @@ |
||
| 6 | 6 | |
| 7 | 7 | class SubtractTest extends TestCase |
| 8 | 8 | { |
| 9 | - public function testDivide() |
|
| 10 | - { |
|
| 9 | + public function testDivide() |
|
| 10 | + { |
|
| 11 | 11 | $firstValue = 50; |
| 12 | 12 | $secondValue = 10; |
| 13 | 13 | $expectedResult = 40; |
| 14 | 14 | $actualResult = subtract($firstValue)($secondValue); |
| 15 | 15 | $this->assertEquals($expectedResult, $actualResult); |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | } |
@@ -6,15 +6,15 @@ |
||
| 6 | 6 | |
| 7 | 7 | class PrependTest extends TestCase |
| 8 | 8 | { |
| 9 | - public function testAppend() |
|
| 10 | - { |
|
| 9 | + public function testAppend() |
|
| 10 | + { |
|
| 11 | 11 | $result = prepend(1)([2, 3]); |
| 12 | 12 | $this->assertEquals([1, 2, 3], $result); |
| 13 | - } |
|
| 13 | + } |
|
| 14 | 14 | |
| 15 | - public function testAppendWithoutAutoCurry() |
|
| 16 | - { |
|
| 15 | + public function testAppendWithoutAutoCurry() |
|
| 16 | + { |
|
| 17 | 17 | $result = prepend(1, [2, 3]); |
| 18 | 18 | $this->assertEquals([1, 2, 3], $result); |
| 19 | - } |
|
| 19 | + } |
|
| 20 | 20 | } |
@@ -7,12 +7,12 @@ |
||
| 7 | 7 | |
| 8 | 8 | class PartialTest extends TestCase |
| 9 | 9 | { |
| 10 | - public function testPartial() |
|
| 11 | - { |
|
| 10 | + public function testPartial() |
|
| 11 | + { |
|
| 12 | 12 | $double = partial(multiply(), [2]); |
| 13 | 13 | $arg = 10; |
| 14 | 14 | $expectedResult = 20; |
| 15 | 15 | $actualResult = $double($arg); |
| 16 | 16 | $this->assertEquals($expectedResult, $actualResult); |
| 17 | - } |
|
| 17 | + } |
|
| 18 | 18 | } |
@@ -7,12 +7,12 @@ |
||
| 7 | 7 | |
| 8 | 8 | class PartialRightTest extends TestCase |
| 9 | 9 | { |
| 10 | - public function testPartial() |
|
| 11 | - { |
|
| 10 | + public function testPartial() |
|
| 11 | + { |
|
| 12 | 12 | $double = partialRight(divide(), [2]); |
| 13 | 13 | $arg = 10; |
| 14 | 14 | $expectedResult = 5; |
| 15 | 15 | $actualResult = $double($arg); |
| 16 | 16 | $this->assertEquals($expectedResult, $actualResult); |
| 17 | - } |
|
| 17 | + } |
|
| 18 | 18 | } |
@@ -7,13 +7,13 @@ |
||
| 7 | 7 | |
| 8 | 8 | class ApplyTest extends TestCase |
| 9 | 9 | { |
| 10 | - public function testApply() |
|
| 11 | - { |
|
| 10 | + public function testApply() |
|
| 11 | + { |
|
| 12 | 12 | $add = add(); |
| 13 | 13 | $firstArg = 1; |
| 14 | 14 | $secondArg = 2; |
| 15 | 15 | $expectedResult = 3; |
| 16 | 16 | $actualResult = apply($add)([$firstArg, $secondArg]); |
| 17 | 17 | $this->assertEquals($expectedResult, $actualResult); |
| 18 | - } |
|
| 18 | + } |
|
| 19 | 19 | } |
@@ -7,23 +7,23 @@ |
||
| 7 | 7 | |
| 8 | 8 | class CallTest extends TestCase |
| 9 | 9 | { |
| 10 | - public function testCallWithCurrying() |
|
| 11 | - { |
|
| 10 | + public function testCallWithCurrying() |
|
| 11 | + { |
|
| 12 | 12 | $add = add(); |
| 13 | 13 | $firstArg = 1; |
| 14 | 14 | $secondArg = 2; |
| 15 | 15 | $expectedResult = 3; |
| 16 | 16 | $actualResult = call()($add)($firstArg, $secondArg); |
| 17 | 17 | $this->assertEquals($expectedResult, $actualResult); |
| 18 | - } |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | - public function testCallWithoutCurrying() |
|
| 21 | - { |
|
| 20 | + public function testCallWithoutCurrying() |
|
| 21 | + { |
|
| 22 | 22 | $add = add(); |
| 23 | 23 | $firstArg = 1; |
| 24 | 24 | $secondArg = 2; |
| 25 | 25 | $expectedResult = 3; |
| 26 | 26 | $actualResult = call($add, $firstArg, $secondArg); |
| 27 | 27 | $this->assertEquals($expectedResult, $actualResult); |
| 28 | - } |
|
| 28 | + } |
|
| 29 | 29 | } |
@@ -6,27 +6,27 @@ |
||
| 6 | 6 | |
| 7 | 7 | class GteTest extends TestCase |
| 8 | 8 | { |
| 9 | - public function testGteWithFirstArgIsLessThanSecondOne() |
|
| 10 | - { |
|
| 9 | + public function testGteWithFirstArgIsLessThanSecondOne() |
|
| 10 | + { |
|
| 11 | 11 | $firstArg = 1; |
| 12 | 12 | $secondArg = 2; |
| 13 | 13 | $actual = gte($firstArg)($secondArg); |
| 14 | 14 | $this->assertFalse($actual); |
| 15 | - } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testGteWithFirstArgIsEqualToSecondOne() |
|
| 18 | - { |
|
| 17 | + public function testGteWithFirstArgIsEqualToSecondOne() |
|
| 18 | + { |
|
| 19 | 19 | $firstArg = 2; |
| 20 | 20 | $secondArg = 2; |
| 21 | 21 | $actual = gte($firstArg)($secondArg); |
| 22 | 22 | $this->assertTrue($actual); |
| 23 | - } |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - public function testGteWithFirstArgIsGreaterThanSecondOne() |
|
| 26 | - { |
|
| 25 | + public function testGteWithFirstArgIsGreaterThanSecondOne() |
|
| 26 | + { |
|
| 27 | 27 | $firstArg = 3; |
| 28 | 28 | $secondArg = 2; |
| 29 | 29 | $actual = gte($firstArg)($secondArg); |
| 30 | 30 | $this->assertTrue($actual); |
| 31 | - } |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -6,27 +6,27 @@ |
||
| 6 | 6 | |
| 7 | 7 | class GtTest extends TestCase |
| 8 | 8 | { |
| 9 | - public function testGtWithFirstArgIsLessThanSecondOne() |
|
| 10 | - { |
|
| 9 | + public function testGtWithFirstArgIsLessThanSecondOne() |
|
| 10 | + { |
|
| 11 | 11 | $firstArg = 1; |
| 12 | 12 | $secondArg = 2; |
| 13 | 13 | $actual = gt($firstArg)($secondArg); |
| 14 | 14 | $this->assertFalse($actual); |
| 15 | - } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testGtWithFirstArgIsEqualToSecondOne() |
|
| 18 | - { |
|
| 17 | + public function testGtWithFirstArgIsEqualToSecondOne() |
|
| 18 | + { |
|
| 19 | 19 | $firstArg = 2; |
| 20 | 20 | $secondArg = 2; |
| 21 | 21 | $actual = gt($firstArg)($secondArg); |
| 22 | 22 | $this->assertFalse($actual); |
| 23 | - } |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - public function testGtWithFirstArgIsGreaterThanSecondOne() |
|
| 26 | - { |
|
| 25 | + public function testGtWithFirstArgIsGreaterThanSecondOne() |
|
| 26 | + { |
|
| 27 | 27 | $firstArg = 3; |
| 28 | 28 | $secondArg = 2; |
| 29 | 29 | $actual = gt($firstArg)($secondArg); |
| 30 | 30 | $this->assertTrue($actual); |
| 31 | - } |
|
| 31 | + } |
|
| 32 | 32 | } |