Exemple #1
0
 public function test_satisfiesAny()
 {
     $persons = [['name' => 'foo', 'age' => 11], ['name' => 'bar', 'age' => 9], ['name' => 'baz', 'age' => 16], ['name' => 'zeta', 'age' => 33], ['name' => 'beta', 'age' => 25]];
     $isValid = F\satisfiesAny(['name' => F\startsWith('b'), 'age' => F\gt(F\__(), 15)]);
     $this->assertEquals([['name' => 'bar', 'age' => 9], ['name' => 'baz', 'age' => 16], ['name' => 'zeta', 'age' => 33], ['name' => 'beta', 'age' => 25]], F\filter($isValid, $persons));
 }
Exemple #2
0
 public function test_gt()
 {
     $this->assertTrue(F\gt(6, 4));
     $this->assertFalse(F\gt(4, 4));
     $this->assertFalse(F\gt(2, 4));
 }