RstUtilsTest.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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\Documentation;
  13. use PhpCsFixer\Documentation\RstUtils;
  14. use PhpCsFixer\Tests\TestCase;
  15. /**
  16. * @internal
  17. *
  18. * @covers \PhpCsFixer\Documentation\RstUtils
  19. */
  20. final class RstUtilsTest extends TestCase
  21. {
  22. public function testToRst(): void
  23. {
  24. self::assertSame(
  25. <<<'TEXT'
  26. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
  27. tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
  28. quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
  29. consequat.
  30. TEXT,
  31. RstUtils::toRst(
  32. 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
  33. 4,
  34. ),
  35. );
  36. }
  37. }