Skip to content

Commit

Permalink
Fix risky test
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Jan 9, 2025
1 parent c825782 commit a367a4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/ServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ServerTest extends TestCase
use m\Adapter\Phpunit\MockeryPHPUnitIntegration;

private Server $server;
private int $obLevel;

public function testInvoke(): void
{
Expand Down Expand Up @@ -145,6 +146,7 @@ public function testExceptionDetails(): void
protected function setUp(): void
{
parent::setUp();
$this->obLevel = \ob_get_level();

$this->server = new Server();
$this->server->registerService(TestInterface::class, new TestService());
Expand All @@ -153,7 +155,7 @@ protected function setUp(): void
protected function tearDown(): void
{
parent::tearDown();
\ob_end_clean();
$this->obLevel < \ob_get_level() and \ob_end_clean();

m::close();
}
Expand Down

0 comments on commit a367a4c

Please sign in to comment.