Skip to content

Commit

Permalink
Closes #5730
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 10, 2024
1 parent 0605856 commit 3616513
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions tests/unit/Framework/ExceptionWrapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
namespace PHPUnit\Framework;

use function print_r;
use BadFunctionCallException;
use Exception;

Expand Down Expand Up @@ -39,24 +38,4 @@ public function testGetOriginalExceptionWithPrevious(): void

$this->assertInstanceOf(BadFunctionCallException::class, $wrapper->getOriginalException());
}

/**
* @runInSeparateProcess
*/
public function testNoOriginalExceptionInStacktrace(): void
{
$e = new BadFunctionCallException('custom class exception');
$wrapper = new ExceptionWrapper($e);

// Replace the only mention of "BadFunctionCallException" in wrapper
$wrapper->setClassName('MyException');

$data = print_r($wrapper, true);

$this->assertStringNotContainsString(
'BadFunctionCallException',
$data,
'Assert there is s no other BadFunctionCallException mention in stacktrace',
);
}
}

0 comments on commit 3616513

Please sign in to comment.