* Dariusz RumiƄski * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Tests\Fixer\PhpUnit; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @internal * * @author Jefersson Nathan * * @covers \PhpCsFixer\Fixer\AbstractPhpUnitFixer * @covers \PhpCsFixer\Fixer\PhpUnit\PhpUnitSizeClassFixer * * @extends AbstractFixerTestCase<\PhpCsFixer\Fixer\PhpUnit\PhpUnitSizeClassFixer> * * @phpstan-import-type _AutogeneratedInputConfiguration from \PhpCsFixer\Fixer\PhpUnit\PhpUnitSizeClassFixer */ final class PhpUnitSizeClassFixerTest extends AbstractFixerTestCase { /** * @param _AutogeneratedInputConfiguration $config * * @dataProvider provideFixCases */ public function testFix(string $expected, ?string $input = null, array $config = []): void { $this->fixer->configure($config); $this->doTest($expected, $input); } public static function provideFixCases(): iterable { yield 'It does not change normal classes' => [ ' [ ' [ ' 'large'], ]; yield 'It adds an @small tag to a class that already has a doc block' => [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ 'doTest($expected, $input); } /** * @return iterable */ public static function provideFix80Cases(): iterable { yield 'it adds a docblock above when there is an attribute' => [ ' [ ' [ ' [ ' [ <<<'PHP' [ <<<'PHP' [ <<<'PHP'