POC: lightweight subprocess isolation via pcntl_fork() #1230
Annotations
7 warnings
Run mutation testing:
src/Framework/TestBuilder.php#L66
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
/** @psalm-suppress UnsafeInstantiation */
$test = new $className($methodName);
- $this->configureTestCase($test, $this->shouldTestMethodBeRunInSeparateProcess($className, $methodName), $this->shouldGlobalStateBePreserved($className, $methodName), $this->shouldAllTestMethodsOfTestClassBeRunInSingleSeparateProcess($className), $this->shouldForkIfPossible($className, $methodName), $this->backupSettings($className, $methodName));
+
return $test;
}
/**
|
Run mutation testing:
src/Framework/TestBuilder.php#L101
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
/** @psalm-suppress UnsafeInstantiation */
$_test = new $className($methodName);
$_test->setData($_dataName, $_data);
- $this->configureTestCase($_test, $runTestInSeparateProcess, $preserveGlobalState, $runClassInSeparateProcess, $forkIfPossible, $backupSettings);
+
$dataProviderTestSuite->addTest($_test, $groups);
}
return $dataProviderTestSuite;
|
Run mutation testing:
src/Framework/TestBuilder.php#L129
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
if ($runClassInSeparateProcess) {
$test->setRunClassInSeparateProcess(true);
}
- if ($forkIfPossible) {
+ if (!$forkIfPossible) {
$test->setForkIfPossible(true);
}
if ($preserveGlobalState !== null) {
|
Run mutation testing:
src/Framework/TestBuilder.php#L130
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
$test->setRunClassInSeparateProcess(true);
}
if ($forkIfPossible) {
- $test->setForkIfPossible(true);
+ $test->setForkIfPossible(false);
}
if ($preserveGlobalState !== null) {
$test->setPreserveGlobalState($preserveGlobalState);
|
Run mutation testing:
src/Framework/TestBuilder.php#L130
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$test->setRunClassInSeparateProcess(true);
}
if ($forkIfPossible) {
- $test->setForkIfPossible(true);
+
}
if ($preserveGlobalState !== null) {
$test->setPreserveGlobalState($preserveGlobalState);
|
Run mutation testing:
src/Framework/TestBuilder.php#L301
Escaped Mutant for Mutator "NotIdentical":
--- Original
+++ New
@@ @@
$metadata = $metadataForMethod->isRunInSeparateProcess()->asArray()[0];
assert($metadata instanceof RunInSeparateProcess);
$forkIfPossible = $metadata->forkIfPossible();
- if ($forkIfPossible !== null) {
+ if ($forkIfPossible === null) {
return $forkIfPossible;
}
}
|
Run mutation testing:
src/Framework/TestBuilder.php#L332
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
return $forkIfPossible;
}
}
- return false;
+ return true;
}
}
|
Loading