for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace DaveLiddament\StaticAnalysisResultsBaseliner\Tests\Unit\Plugins\OutputFormatters;
use DaveLiddament\StaticAnalysisResultsBaseliner\Domain\OutputFormatter\OutputFormatter;
use DaveLiddament\StaticAnalysisResultsBaseliner\Plugins\OutputFormatters\TableOutputFormatter;
final class TableOutputFormatterTest extends AbstractOutputFormatterTest
{
public function testName(): void
$this->assertName('table');
}
public function testNoIssues(): void
$expectedOutput = <<<EOF
No issues
EOF;
$this->assertNoIssuesOutput($expectedOutput);
public function testWithIssues(): void
FILE: /FILE_1
+------+-------------+
| Line | Description |
| 10 | MESSAGE_1 |
| 12 | MESSAGE_2 |
FILE: /FILE_2
+------+--------------------+
| 0 | WARNING: MESSAGE_3 |
These results include warnings. To exclude warnings from output use the --ignore-warnings flag.
$this->assertIssuesOutput($expectedOutput);
public function testWithIssuesAndWarningsIgnored(): void
$this->assertIssuesOutputWithWarningsIgnored($expectedOutput);
protected function getOutputFormatter(): OutputFormatter
return new TableOutputFormatter();