Skip to content

Commit c38a13b

Browse files
committed
update tests
1 parent c6afc73 commit c38a13b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/system/Helpers/Array/ArrayHelperDotHasTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ final class ArrayHelperDotHasTest extends CIUnitTestCase
3232
],
3333
];
3434

35-
public function testDotKeyExists(): void
35+
public function testDotHas(): void
3636
{
3737
$this->assertFalse(ArrayHelper::dotHas('', $this->array));
3838
$this->assertTrue(ArrayHelper::dotHas('contacts', $this->array));
@@ -43,23 +43,23 @@ public function testDotKeyExists(): void
4343
$this->assertFalse(ArrayHelper::dotHas('contacts.friends.1.name', $this->array));
4444
}
4545

46-
public function testDotKeyExistsWithEndingWildCard(): void
46+
public function testDotHasWithEndingWildCard(): void
4747
{
4848
$this->expectException(InvalidArgumentException::class);
4949
$this->expectExceptionMessage('You must set key right after "*". Invalid index: "contacts.*"');
5050

5151
$this->assertTrue(ArrayHelper::dotHas('contacts.*', $this->array));
5252
}
5353

54-
public function testDotKeyExistsWithDoubleWildCard(): void
54+
public function testDotHasWithDoubleWildCard(): void
5555
{
5656
$this->expectException(InvalidArgumentException::class);
5757
$this->expectExceptionMessage('You must set key right after "*". Invalid index: "contacts.*.*.age"');
5858

5959
$this->assertTrue(ArrayHelper::dotHas('contacts.*.*.age', $this->array));
6060
}
6161

62-
public function testDotKeyExistsWithWildCard(): void
62+
public function testDotHasWithWildCard(): void
6363
{
6464
$this->assertTrue(ArrayHelper::dotHas('*.friends', $this->array));
6565
$this->assertTrue(ArrayHelper::dotHas('contacts.friends.*.age', $this->array));

tests/system/Helpers/Array/ArrayHelperDotModifyTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ public function testDotSetWithEscapedDotKey(): void
5454
/**
5555
* @param array<array-key, mixed> $array
5656
*/
57-
#[DataProvider('provideDotKeyExists')]
58-
public function testDotKeyExists(string $index, array $array, bool $expected): void
57+
#[DataProvider('provideDotHas')]
58+
public function testDotHas(string $index, array $array, bool $expected): void
5959
{
6060
$this->assertSame($expected, ArrayHelper::dotHas($index, $array));
6161
}
6262

6363
/**
6464
* @return iterable<string, array{index: string, array: array<array-key, mixed>, expected: bool}>
6565
*/
66-
public static function provideDotKeyExists(): iterable
66+
public static function provideDotHas(): iterable
6767
{
6868
yield from [
6969
'null value at leaf' => [

0 commit comments

Comments
 (0)