All PHPUnit test classes should be marked as internal.
What types of classes to mark as internal.
Allowed values: a subset of ['abstract', 'final', 'normal']
Default value: ['normal', 'final']
Default configuration.
--- Original
+++ New
<?php
+
+/**
+ * @internal
+ */
class MyTest extends TestCase {}
With configuration: ['types' => ['final']]
.
--- Original
+++ New
<?php
class MyTest extends TestCase {}
+/**
+ * @internal
+ */
final class FinalTest extends TestCase {}
abstract class AbstractTest extends TestCase {}
The rule is part of the following rule set:
- Fixer class: PhpCsFixer\Fixer\PhpUnit\PhpUnitInternalClassFixer
- Test class: PhpCsFixer\Tests\Fixer\PhpUnit\PhpUnitInternalClassFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.