コード例 #1
0
ファイル: K_estrelTest.php プロジェクト: rkgladson/PHPixme
 public function test_return($value = true, $notValue = false)
 {
     $this->assertInstanceOf(Closure, P\K($value), 'K should return a closure');
     $this->assertEquals($value, P\K($value)->__invoke($notValue), 'K resultant closure should return the constant that has been closed');
 }
コード例 #2
0
ファイル: S_tarlingTest.php プロジェクト: rkgladson/PHPixme
 public function test_return($value = true)
 {
     $this->assertInstanceOf(Closure, P\S(P\I), 'Starling should be able to be partially applied');
     $this->assertEquals($value, P\S(P\K)->__invoke(P\K($value))->__invoke($value), 'S(K, K($value))($value) === $value is one of the more basic proofs to Starling');
 }