TextReporterTest.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4. * This file is part of PHP CS Fixer.
  5. *
  6. * (c) Fabien Potencier <fabien@symfony.com>
  7. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  8. *
  9. * This source file is subject to the MIT license that is bundled
  10. * with this source code in the file LICENSE.
  11. */
  12. namespace PhpCsFixer\Tests\Console\Report\ListSetsReport;
  13. use PhpCsFixer\Console\Report\ListSetsReport\ReporterInterface;
  14. use PhpCsFixer\Console\Report\ListSetsReport\TextReporter;
  15. /**
  16. * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
  17. *
  18. * @internal
  19. *
  20. * @covers \PhpCsFixer\Console\Report\ListSetsReport\TextReporter
  21. */
  22. final class TextReporterTest extends AbstractReporterTestCase
  23. {
  24. protected function createReporter(): ReporterInterface
  25. {
  26. return new TextReporter();
  27. }
  28. protected function getFormat(): string
  29. {
  30. return 'txt';
  31. }
  32. protected function assertFormat(string $expected, string $input): void
  33. {
  34. self::assertSame($expected, $input);
  35. }
  36. protected static function createSimpleReport(): string
  37. {
  38. return str_replace("\n", PHP_EOL, ' 1) @PhpCsFixer
  39. Rule set as used by the PHP-CS-Fixer development team, highly opinionated.
  40. 2) @Symfony:risky
  41. Rules that follow the official `Symfony Coding Standards <https://symfony.com/doc/current/contributing/code/standards.html>`_.
  42. Set contains risky rules.
  43. ');
  44. }
  45. }