Output buffer - fix 5851 #1466
ci.yaml
on: pull_request
Dependency Validation
13s
Coding Guidelines
29s
Matrix: Unit Tests
Type Checker
29s
Matrix: End-to-End Tests
Matrix: Test PHAR
Annotations
10 warnings
Mutation Testing:
src/Framework/TestCase.php#L459
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
*
* @internal This method is not covered by the backward compatibility promise for PHPUnit
*/
- final public function runBare(): void
+ final protected function runBare(): void
{
$emitter = Event\Facade::emitter();
error_clear_last();
|
Mutation Testing:
src/Framework/TestCase.php#L564
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
}
}
$outputBufferingStopped = false;
- if (!isset($e) && $this->hasExpectationOnOutput()) {
+ if (!isset($e) || $this->hasExpectationOnOutput()) {
// if it fails now, we shouldn't try again later either
$outputBufferingStopped = true;
if ($this->stopOutputBuffering()) {
|
Mutation Testing:
src/Framework/TestCase.php#L564
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
--- Original
+++ New
@@ @@
}
}
$outputBufferingStopped = false;
- if (!isset($e) && $this->hasExpectationOnOutput()) {
+ if (isset($e) && !$this->hasExpectationOnOutput()) {
// if it fails now, we shouldn't try again later either
$outputBufferingStopped = true;
if ($this->stopOutputBuffering()) {
|
Mutation Testing:
src/Framework/TestCase.php#L564
Escaped Mutant for Mutator "LogicalAndNegation":
--- Original
+++ New
@@ @@
}
}
$outputBufferingStopped = false;
- if (!isset($e) && $this->hasExpectationOnOutput()) {
+ if (!(!isset($e) && $this->hasExpectationOnOutput())) {
// if it fails now, we shouldn't try again later either
$outputBufferingStopped = true;
if ($this->stopOutputBuffering()) {
|
Mutation Testing:
src/Framework/TestCase.php#L564
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
}
}
$outputBufferingStopped = false;
- if (!isset($e) && $this->hasExpectationOnOutput()) {
+ if (!isset($e) && !$this->hasExpectationOnOutput()) {
// if it fails now, we shouldn't try again later either
$outputBufferingStopped = true;
if ($this->stopOutputBuffering()) {
|
Mutation Testing:
src/Framework/TestCase.php#L1829
Escaped Mutant for Mutator "Assignment":
--- Original
+++ New
@@ @@
// if any children buffers have a low chunk size and already returned data
// or ob_flush was called
if ($this->outputBufferingActive) {
- $this->output .= $output;
+ $this->output = $output;
if (($phase & PHP_OUTPUT_HANDLER_FINAL) === PHP_OUTPUT_HANDLER_FINAL) {
// don't handle, since we report an error already if our handler is missing
// since it's inconsistent here with ob_end_flush/ob_end_clean
|
Mutation Testing:
src/Framework/TestCase.php#L1831
Escaped Mutant for Mutator "BitwiseAnd":
--- Original
+++ New
@@ @@
// or ob_flush was called
if ($this->outputBufferingActive) {
$this->output .= $output;
- if (($phase & PHP_OUTPUT_HANDLER_FINAL) === PHP_OUTPUT_HANDLER_FINAL) {
+ if (($phase | PHP_OUTPUT_HANDLER_FINAL) === PHP_OUTPUT_HANDLER_FINAL) {
// don't handle, since we report an error already if our handler is missing
// since it's inconsistent here with ob_end_flush/ob_end_clean
return '';
|
Mutation Testing:
src/Framework/TestCase.php#L1831
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
// or ob_flush was called
if ($this->outputBufferingActive) {
$this->output .= $output;
- if (($phase & PHP_OUTPUT_HANDLER_FINAL) === PHP_OUTPUT_HANDLER_FINAL) {
+ if (($phase & PHP_OUTPUT_HANDLER_FINAL) !== PHP_OUTPUT_HANDLER_FINAL) {
// don't handle, since we report an error already if our handler is missing
// since it's inconsistent here with ob_end_flush/ob_end_clean
return '';
|
Mutation Testing:
src/Framework/TestCase.php#L1850
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
// private to ensure it cannot be restarted after ending it from outside this class
private function startOutputBuffering(): void
{
- ob_start([$this, 'outputBufferingCallback']);
+ ob_start(['outputBufferingCallback']);
$this->outputBufferingActive = true;
$this->outputBufferingLevel = ob_get_level();
}
|
Mutation Testing:
src/Framework/TestCase.php#L1850
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
// private to ensure it cannot be restarted after ending it from outside this class
private function startOutputBuffering(): void
{
- ob_start([$this, 'outputBufferingCallback']);
+
$this->outputBufferingActive = true;
$this->outputBufferingLevel = ob_get_level();
}
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
phpunit-snapshot-phar
Expired
|
683 KB |
|