|
@@ -17,14 +17,9 @@ namespace PhpCsFixer\Tests\AutoReview;
|
|
|
use PhpCsFixer\AbstractFixer;
|
|
|
use PhpCsFixer\AbstractPhpdocTypesFixer;
|
|
|
use PhpCsFixer\AbstractProxyFixer;
|
|
|
-use PhpCsFixer\Console\Command\DocumentationCommand;
|
|
|
use PhpCsFixer\Console\Command\FixCommand;
|
|
|
use PhpCsFixer\DocBlock\Annotation;
|
|
|
use PhpCsFixer\DocBlock\DocBlock;
|
|
|
-use PhpCsFixer\Documentation\DocumentationLocator;
|
|
|
-use PhpCsFixer\Documentation\FixerDocumentGenerator;
|
|
|
-use PhpCsFixer\Documentation\RstUtils;
|
|
|
-use PhpCsFixer\Documentation\RuleSetDocumentationGenerator;
|
|
|
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
|
|
|
use PhpCsFixer\Fixer\PhpUnit\PhpUnitNamespacedFixer;
|
|
|
use PhpCsFixer\FixerFactory;
|
|
@@ -65,21 +60,6 @@ final class ProjectCodeTest extends TestCase
|
|
|
*/
|
|
|
private static array $tokensCache = [];
|
|
|
|
|
|
- /**
|
|
|
- * This structure contains older classes that are not yet covered by tests.
|
|
|
- *
|
|
|
- * It may only shrink, never add anything to it.
|
|
|
- *
|
|
|
- * @var string[]
|
|
|
- */
|
|
|
- private static $classesWithoutTests = [
|
|
|
- DocumentationCommand::class,
|
|
|
- DocumentationLocator::class,
|
|
|
- FixerDocumentGenerator::class,
|
|
|
- RstUtils::class,
|
|
|
- RuleSetDocumentationGenerator::class,
|
|
|
- ];
|
|
|
-
|
|
|
public static function tearDownAfterClass(): void
|
|
|
{
|
|
|
self::$srcClassCases = null;
|
|
@@ -87,16 +67,6 @@ final class ProjectCodeTest extends TestCase
|
|
|
self::$tokensCache = [];
|
|
|
}
|
|
|
|
|
|
- public function testThatClassesWithoutTestsVarIsProper(): void
|
|
|
- {
|
|
|
- $unknownClasses = array_filter(
|
|
|
- self::$classesWithoutTests,
|
|
|
- static fn (string $class): bool => !class_exists($class) && !trait_exists($class),
|
|
|
- );
|
|
|
-
|
|
|
- self::assertSame([], $unknownClasses);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* @dataProvider provideThatSrcClassHaveTestClassCases
|
|
|
*/
|
|
@@ -104,11 +74,6 @@ final class ProjectCodeTest extends TestCase
|
|
|
{
|
|
|
$testClassName = 'PhpCsFixer\\Tests'.substr($className, 10).'Test';
|
|
|
|
|
|
- if (\in_array($className, self::$classesWithoutTests, true)) {
|
|
|
- self::assertFalse(class_exists($testClassName), sprintf('Class "%s" already has tests, so it should be removed from "%s::$classesWithoutTests".', $className, self::class));
|
|
|
- self::markTestIncomplete(sprintf('Class "%s" has no tests yet, please help and add it.', $className));
|
|
|
- }
|
|
|
-
|
|
|
self::assertTrue(class_exists($testClassName), sprintf('Expected test class "%s" for "%s" not found.', $testClassName, $className));
|
|
|
}
|
|
|
|