Skip to content

Commit 753741a

Browse files
committed
Inline assertion callback
1 parent 9049f68 commit 753741a

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/Testing/Fakes/FakeIndexManager.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,12 @@ public function assertChecked(string $index): static
149149
*/
150150
public function assertCreated(string $index, ?callable $callback = null): static
151151
{
152-
$assertion = isset($callback)
153-
? fn (IndexBlueprint $index): bool => $callback(
154-
$index->mapping(),
155-
$index->settings(),
156-
)
157-
: null;
158-
159152
$this->manager->assertCreated(
160153
MigrationPrefix::index($index),
161-
$assertion,
154+
$callback ? fn (IndexBlueprint $index): bool => $callback(
155+
$index->mapping(),
156+
$index->settings(),
157+
) : null,
162158
);
163159

164160
return $this;

0 commit comments

Comments
 (0)