mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix falsable issues with ob_get_clean in tests
This commit is contained in:
parent
5e667ef35d
commit
70507717c4
@ -126,7 +126,7 @@ class IssueBufferTest extends TestCase
|
||||
|
||||
ob_start();
|
||||
IssueBuffer::finish($projectAnalzyer, false, microtime(true), false, $baseline);
|
||||
$output = ob_get_clean();
|
||||
$output = (string) ob_get_clean();
|
||||
$this->assertStringNotContainsString("ERROR", $output, "all issues baselined");
|
||||
IssueBuffer::clear();
|
||||
}
|
||||
@ -137,7 +137,7 @@ class IssueBufferTest extends TestCase
|
||||
$project_analyzer->stdout_report_options = new ReportOptions;
|
||||
ob_start();
|
||||
IssueBuffer::printSuccessMessage($project_analyzer);
|
||||
$output = ob_get_clean();
|
||||
$output = (string) ob_get_clean();
|
||||
|
||||
$this->assertStringContainsString('No errors found!', $output);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ class ProjectCheckerTest extends TestCase
|
||||
|
||||
ob_start();
|
||||
$this->project_analyzer->check('tests/fixtures/DummyProject');
|
||||
$output = ob_get_clean();
|
||||
$output = (string) ob_get_clean();
|
||||
|
||||
$this->assertStringContainsString('Target PHP version: 8.1 (set by tests)', $output);
|
||||
$this->assertStringContainsString('Scanning files...', $output);
|
||||
@ -280,7 +280,7 @@ class Bat
|
||||
|
||||
ob_start();
|
||||
$this->project_analyzer->checkDir('tests/fixtures/DummyProject');
|
||||
$output = ob_get_clean();
|
||||
$output = (string) ob_get_clean();
|
||||
|
||||
$this->assertStringContainsString('Target PHP version: 8.1 (set by tests)', $output);
|
||||
$this->assertStringContainsString('Scanning files...', $output);
|
||||
@ -321,7 +321,7 @@ class Bat
|
||||
realpath((string) getcwd() . '/tests/fixtures/DummyProject/Bar.php'),
|
||||
realpath((string) getcwd() . '/tests/fixtures/DummyProject/SomeTrait.php'),
|
||||
]);
|
||||
$output = ob_get_clean();
|
||||
$output = (string) ob_get_clean();
|
||||
|
||||
$this->assertStringContainsString('Target PHP version: 8.1 (set by tests)', $output);
|
||||
$this->assertStringContainsString('Scanning files...', $output);
|
||||
@ -362,7 +362,7 @@ class Bat
|
||||
realpath((string) getcwd() . '/tests/fixtures/DummyProject/Bar.php'),
|
||||
realpath((string) getcwd() . '/tests/fixtures/DummyProject/SomeTrait.php'),
|
||||
]);
|
||||
$output = ob_get_clean();
|
||||
$output = (string) ob_get_clean();
|
||||
|
||||
$this->assertStringContainsString('Target PHP version: 8.1 (set by tests)', $output);
|
||||
$this->assertStringContainsString('Scanning files...', $output);
|
||||
|
Loading…
Reference in New Issue
Block a user