Skip to content

Commit

Permalink
Don't use array_find on unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrou committed Dec 3, 2024
1 parent 5419dcd commit e259164
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/Unit/Schema/Directives/HideDirectiveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ public function testHiddenInputField(): void

$types = $this->graphQL($introspectionQuery)->json('data.__schema.types');

$input = array_find($types, fn (array $type): bool => $type['name'] === 'Input');
$input = array_filter($types, fn (array $type): bool => $type['name'] === 'Input');

$this->assertEmpty($input['inputFields']);
$this->assertCount(1, $input);
$this->assertEmpty(current($input)['inputFields']);
}

public function testHiddenWhenManuallySettingEnv(): void
Expand Down

0 comments on commit e259164

Please sign in to comment.