We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b297120 commit 47bc051Copy full SHA for 47bc051
tests/ArrayRedactorTest.php
@@ -94,4 +94,16 @@ public function can_omit_constructor_arguments_in_favor_of_methods()
94
'password' => null
95
]), $result);
96
}
97
+
98
+ /** @test */
99
+ public function can_accept_closure_in_ink()
100
+ {
101
+ $array = $this->content;
102
+ $result = (new ArrayRedactor())->content($this->content)->keys(['email'])->ink(function() use ($array) {
103
+ return substr($array['email'], stripos($array['email'], '@'));
104
+ })->redact();
105
+ $this->assertEquals(array_merge($this->content, [
106
+ 'email' => '@gmail.com'
107
+ ]), $result);
108
+ }
109
0 commit comments