NoEmptyPhpdocFixerTest.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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\Fixer\Phpdoc;
  13. use PhpCsFixer\Tests\Test\AbstractFixerTestCase;
  14. /**
  15. * @internal
  16. *
  17. * @covers \PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer
  18. */
  19. final class NoEmptyPhpdocFixerTest extends AbstractFixerTestCase
  20. {
  21. /**
  22. * @dataProvider provideFixCases
  23. */
  24. public function testFix(string $expected, ?string $input = null): void
  25. {
  26. $this->doTest($expected, $input);
  27. }
  28. public static function provideFixCases(): iterable
  29. {
  30. yield [
  31. '<?php
  32. /** a */
  33. '.'
  34. '.'
  35. '.'
  36. '.'
  37. /**
  38. * test
  39. */
  40. /** *test* */
  41. ',
  42. '<?php
  43. /** *//** a *//** */
  44. /**
  45. */
  46. /**
  47. *
  48. */
  49. /** ***
  50. *
  51. ******/
  52. /**
  53. **/
  54. /**
  55. * test
  56. */
  57. /** *test* */
  58. ',
  59. ];
  60. }
  61. }