Skip to content

Commit

Permalink
old array notation for php 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
matteosister committed Jul 30, 2015
1 parent 82879f0 commit 427aa68
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Cypress/Curry/functions_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function test_curry_identity()

public function test_curry_args_identity()
{
$identity = C\curry_args(array(new TestSubject(), 'identity'), [1]);
$identity = C\curry_args(array(new TestSubject(), 'identity'), array(1));
$this->assertEquals(1, $identity(1));
}

Expand All @@ -41,7 +41,7 @@ public function test_curry_with_two_later_param()

public function test_curry_args_with_two_later_param()
{
$curriedTwo = C\curry_args(array(new TestSubject(), 'add4'), [1, 1]);
$curriedTwo = C\curry_args(array(new TestSubject(), 'add4'), array(1, 1));
$this->assertInstanceOf('Closure', $curriedTwo);
$this->assertEquals(4, $curriedTwo(1, 1));
}
Expand All @@ -62,7 +62,7 @@ public function test_curry_right()

public function test_curry_right_args()
{
$divideBy10 = C\curry_right_args(array(new TestSubject(), 'divide2'), [10]);
$divideBy10 = C\curry_right_args(array(new TestSubject(), 'divide2'), array(10));
$this->assertInstanceOf('Closure', $divideBy10);
$this->assertEquals(10, $divideBy10(100));
}
Expand All @@ -75,7 +75,7 @@ public function test_curry_right_immediate()

public function test_curry_right_args_immediate()
{
$divide3 = C\curry_right_args(array(new TestSubject(), 'divide3'), [5, 2, 20]);
$divide3 = C\curry_right_args(array(new TestSubject(), 'divide3'), array(5, 2, 20));
$this->assertEquals(2, $divide3());
}

Expand All @@ -101,7 +101,7 @@ public function test_curry_right_three_times()

public function test_curry_right_args_three_times()
{
$divideBy5 = C\curry_right_args(array(new TestSubject(), 'divide3'), [5]);
$divideBy5 = C\curry_right_args(array(new TestSubject(), 'divide3'), array(5));
$divideBy10And5 = $divideBy5(10);
$this->assertEquals(2, $divideBy10And5(100));
}
Expand Down

0 comments on commit 427aa68

Please sign in to comment.