feat: Adds shareContext
to LogFake
#269
Annotations
1 error and 2 warnings
Check
Process completed with exit code 1.
|
Check:
src/LogFake.php#L107
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
public function assertHasSharedContext(Closure|array $callback, ?string $message = null): LogFake
{
$callback = is_array($callback) ? fn($context) => $context === $callback : $callback;
- PHPUnit::assertTrue($callback($this->sharedContext), $message ?? 'Expected shared context was not found.');
+ PHPUnit::assertTrue($callback($this->sharedContext), 'Expected shared context was not found.' ?? $message);
return $this;
}
/**
|
Check:
src/LogFake.php#L264
Escaped Mutant for Mutator "UnwrapArrayMerge":
--- Original
+++ New
@@ @@
foreach ($this->channels as $channel) {
$channel->withContext($context);
}
- $this->sharedContext = array_merge($this->sharedContext, $context);
+ $this->sharedContext = $context;
return $this;
}
}
|