diff --git a/tests/Config/PluginTest.php b/tests/Config/PluginTest.php index 5f73afcc6..07b9b7109 100644 --- a/tests/Config/PluginTest.php +++ b/tests/Config/PluginTest.php @@ -22,6 +22,8 @@ use Psalm\PluginRegistrationSocket; use Psalm\Tests\Internal\Provider; use Psalm\Tests\TestConfig; use function sprintf; +use function ob_start; +use function ob_end_clean; class PluginTest extends \Psalm\Tests\TestCase { @@ -869,7 +871,9 @@ class PluginTest extends \Psalm\Tests\TestCase $this->project_analyzer->stdout_report_options->format = \Psalm\Report::TYPE_JSON; $this->project_analyzer->check('tests/fixtures/DummyProject', true); + ob_start(); \Psalm\IssueBuffer::finish($this->project_analyzer, true, microtime(true)); + ob_end_clean(); } /** diff --git a/tests/ProjectCheckerTest.php b/tests/ProjectCheckerTest.php index 4be06043a..fc8404e8d 100644 --- a/tests/ProjectCheckerTest.php +++ b/tests/ProjectCheckerTest.php @@ -173,7 +173,9 @@ class ProjectCheckerTest extends TestCase $this->project_analyzer->stdout_report_options->format = \Psalm\Report::TYPE_JSON; $this->project_analyzer->check('tests/fixtures/DummyProject', true); + ob_start(); \Psalm\IssueBuffer::finish($this->project_analyzer, true, microtime(true)); + ob_end_clean(); $this->assertSame( 'Psalm was able to infer types for 100% of the codebase', @@ -218,7 +220,9 @@ class ProjectCheckerTest extends TestCase $this->project_analyzer->stdout_report_options->format = \Psalm\Report::TYPE_JSON; $this->project_analyzer->check('tests/fixtures/DummyProject', true); + ob_start(); \Psalm\IssueBuffer::finish($this->project_analyzer, true, microtime(true)); + ob_end_clean(); $this->assertSame( 'Psalm was able to infer types for 100% of the codebase',