Fork me on GitHub
a Sensio Labs Product

I ate three cookies πŸͺ (v3.40.2) edition

Rule php_unit_internal_classΒΆ

All PHPUnit test classes should be marked as internal.

ConfigurationΒΆ

typesΒΆ

What types of classes to mark as internal.

Allowed values: a subset of ['abstract', 'final', 'normal']

Default value: ['normal', 'final']

ExamplesΒΆ

Example #1ΒΆ

Default configuration.

--- Original
+++ New
 <?php
+
+/**
+ * @internal
+ */
 class MyTest extends TestCase {}

Example #2ΒΆ

With configuration: ['types' => ['final']].

--- Original
+++ New
 <?php
 class MyTest extends TestCase {}
+/**
+ * @internal
+ */
 final class FinalTest extends TestCase {}
 abstract class AbstractTest extends TestCase {}

Rule setsΒΆ

The rule is part of the following rule set:

Source classΒΆ

PhpCsFixer\Fixer\PhpUnit\PhpUnitInternalClassFixer