Skip to content

Commit 5345dff

Browse files
committed
add tests for matchesAny
1 parent 6af6f93 commit 5345dff

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Support/ArrTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,16 @@ public function it_matches_delimited_regex_patterns()
3434
$this->assertTrue(Arr::matches('test', ['/^te.+$/', 'one']));
3535
$this->assertFalse(Arr::matches('test', ['/^Test$/', '/^one$/']));
3636
}
37+
38+
/** @test */
39+
public function it_matches_any_string_against_other_strings()
40+
{
41+
$this->assertTrue(Arr::matchesAny(['one', 'two'], ['abc', 'two']));
42+
}
43+
44+
/** @test */
45+
public function it_matches_any_nested_array_of_strings()
46+
{
47+
$this->assertTrue(Arr::matchesAny([ 'def', ['one', [ 'two' ] ] ], ['abc', 'two']));
48+
}
3749
}

0 commit comments

Comments
 (0)