Skip to content

Commit

Permalink
Added lazy if test
Browse files Browse the repository at this point in the history
  • Loading branch information
mwijngaard committed Oct 23, 2015
1 parent 82576d3 commit 9f69f33
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/Lazy/LazyIfTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace mwijngaard\Lazy;

use Eris\TestTrait;
use Eris\Generator;

class LazyIfTest extends \PHPUnit_Framework_TestCase {
use TestTrait;

public function testEqualToNative() {
$this->forAll(Generator\int(), Generator\int())->__invoke(function ($a, $b) {
$this->assertEquals($a > $b ? $a : $b, lazy_if($a > $b, $a, $b)->resolve());
});
}
}

0 comments on commit 9f69f33

Please sign in to comment.