Skip to content

Commit

Permalink
Add case sensitivity option to pattern matching (#7219)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia authored Jan 8, 2025
1 parent 9e4845e commit 9ec6c15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,15 @@ public function testDot(): void

public function testHasAny(): void
{
$col = new Collection(['id' => 1, 'first' => 'Hello', 'second' => 'World']);
$col = new Collection(['id' => 1, 'first' => 'Hello', 'second' => 'World', 'null' => null]);

$this->assertTrue($col->hasAny('first'));
$this->assertFalse($col->hasAny('third'));
$this->assertTrue($col->hasAny(['first', 'second']));
$this->assertTrue($col->hasAny(['first', 'fourth']));
$this->assertFalse($col->hasAny(['third', 'fourth']));
$this->assertFalse($col->hasAny('third', 'fourth'));
$this->assertFalse($col->hasAny('null'));
$this->assertFalse($col->hasAny([]));
}

Expand Down

0 comments on commit 9ec6c15

Please sign in to comment.