Add Closure support to testing documentation
#825
Merged
Annotations
10 warnings
|
Infection:
src/Console/Command/DatabaseCreateCommand.php#L51
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
if ($ifNotExists && $hasDatabase) {
$console->warning(sprintf('Database "%s" already exists. Skipped.', $databaseName));
- $tempConnection->close();
+
return 0;
}
|
|
Infection:
src/Console/Command/DatabaseCreateCommand.php#L49
Escaped Mutant for Mutator "LogicalAnd":
@@ @@
$ifNotExists = InputHelper::bool($input->getOption('if-not-exists'));
$hasDatabase = $this->helper->hasDatabase($tempConnection, $databaseName);
- if ($ifNotExists && $hasDatabase) {
+ if ($ifNotExists || $hasDatabase) {
$console->warning(sprintf('Database "%s" already exists. Skipped.', $databaseName));
$tempConnection->close();
|
|
Infection:
src/CommandBus/SyncCommandBus.php#L35
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
/** @throws HandlerNotFound */
public function dispatch(object $command): void
{
- $this->logger?->debug('CommandBus: dispatch command', ['command' => $command::class]);
+ $this->logger?->debug('CommandBus: dispatch command', []);
$handlers = $this->handlerProvider->handlerForCommand($command::class);
|
|
Infection:
src/CommandBus/ServiceHandlerProvider.php#L57
Escaped Mutant for Mutator "TrueValue":
@@ @@
}
}
- $this->initialized = true;
+ $this->initialized = false;
}
/**
|
|
Infection:
src/CommandBus/ServiceHandlerProvider.php#L48
Escaped Mutant for Mutator "Continue_":
@@ @@
$service::{$handler->method}(...),
);
- continue;
+ break;
}
$this->handlers[$handler->commandClass][] = new HandlerDescriptor(
|
|
Infection:
src/CommandBus/Handler/UpdateAggregateHandler.php#L51
Escaped Mutant for Mutator "Continue_":
@@ @@
$attributes = $property->getAttributes(Id::class);
if ($attributes === []) {
- continue;
+ break;
}
$value = $property->getValue($command);
|
|
Infection:
src/CommandBus/Handler/UpdateAggregateHandler.php#L37
Escaped Mutant for Mutator "SpreadOneItem":
@@ @@
$reflectionMethod->invokeArgs(
$aggregate,
- [...$this->parameterResolver->resolve($reflectionMethod, $command)],
+ [[...$this->parameterResolver->resolve($reflectionMethod, $command)][0]],
);
$repository->save($aggregate);
|
|
Infection:
src/CommandBus/AggregateHandlerProvider.php#L75
Escaped Mutant for Mutator "TrueValue":
@@ @@
}
}
- $this->initialized = true;
+ $this->initialized = false;
}
/**
|
|
Infection:
src/Aggregate/AggregateRootAttributeBehaviour.php#L98
Escaped Mutant for Mutator "ReturnRemoval":
@@ @@
public function aggregateRootId(): AggregateRootId
{
if ($this->cachedAggregateRootId instanceof AggregateRootId) {
- return $this->cachedAggregateRootId;
+
}
$metadata = static::metadata();
|
|
Infection:
src/Aggregate/AggregateRootAttributeBehaviour.php#L68
Escaped Mutant for Mutator "AssignCoalesce":
@@ @@
private function passRecorderToChildAggregates(): void
{
$metadata = static::metadata();
- $this->recorder ??= $this->recordThat(...);
+ $this->recorder = $this->recordThat(...);
foreach ($metadata->childAggregates as $propertyName) {
$child = $this->getChildAggregateByPropertyName($propertyName);
|
Loading