41 lines
840 B
Plaintext
41 lines
840 B
Plaintext
By default, PHPUnit CLI only executes test classes with names that end in "Test". Name your class "TestClassX.php", for instance, and it will be skipped.
|
|
|
|
This rule raises an issue for each test class with a name not ending in "Test".
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,php]
|
|
----
|
|
class TestClassX extends PHPUnit\Framework\TestCase { // Noncompliant
|
|
|
|
public void testDoTheThing() {
|
|
//...
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,php]
|
|
----
|
|
class ClassXTest extends PHPUnit\Framework\TestCase {
|
|
|
|
public void testDoTheThing() {
|
|
//...
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../highlighting.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|