Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function test() |
||
13 | { |
||
14 | $placeholders = [ |
||
15 | 'to' => '[email protected]', |
||
16 | 'from' => '[email protected]' |
||
17 | ]; |
||
18 | |||
19 | $propEq = partial(function ($k, $v, array $xss) { |
||
20 | return ($xss[$k] ?? false) === $v; |
||
21 | }); |
||
22 | |||
23 | $y = allPass([has('from'), has('to')]); |
||
24 | $this->assertTrue($y($placeholders)); |
||
25 | |||
26 | $x = allPass([$propEq('rank', 'Q'), $propEq('suit', '♠︎')]); |
||
27 | $this->assertTrue($x(['rank' => 'Q', 'suit' => '♠︎'])); |
||
28 | $this->assertFalse($x(['rank' => 'Q', 'suit' => '♣︎︎'])); |
||
29 | } |
||
30 | } |
||
31 |