Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Jul 28, 2023
1 parent b093762 commit 3c7b59c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/Command/TwigCsFixerCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ public function testExecuteWithReportErrors(): void
'paths' => [$this->getTmpPath(__DIR__.'/Fixtures')],
]);

$display = $commandTester->getDisplay();
static::assertStringContainsString('directory/subdirectory/file.twig', $display);
static::assertStringContainsString('directory/file.twig', $display);
static::assertStringContainsString(
'[ERROR] Files linted: 3, notices: 0, warnings: 0, errors: 3',
$commandTester->getDisplay()
$display
);
static::assertSame(Command::FAILURE, $commandTester->getStatusCode());
}
Expand All @@ -77,6 +80,8 @@ public function testExecuteWithReportErrorsFixed(): void

$display = $commandTester->getDisplay();
static::assertStringNotContainsString('Changed', $display);
static::assertStringNotContainsString('directory/subdirectory/file.twig', $display);
static::assertStringContainsString('directory/file.twig', $display);
static::assertStringContainsString(
'[ERROR] Files linted: 3, notices: 0, warnings: 0, errors: 1',
$display
Expand All @@ -96,6 +101,8 @@ public function testExecuteWithReportErrorsFixedVerbose(): void

$display = $commandTester->getDisplay();
static::assertStringContainsString('Changed', $display);
static::assertStringContainsString('directory/subdirectory/file.twig', $display);
static::assertStringContainsString('directory/file.twig', $display);
static::assertStringContainsString(
'[ERROR] Files linted: 3, notices: 0, warnings: 0, errors: 1',
$display
Expand Down

0 comments on commit 3c7b59c

Please sign in to comment.