Skip to content

Commit fa7afea

Browse files
committed
Sync documentation for Conventions plugin
1 parent bc3bcd0 commit fa7afea

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

docs/plugins/convention.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ llms_description: "Convention-based test discovery: *Test class suffix, test* me
55

66
# Naming Conventions
77

8-
Testo can discover tests by naming patterns — no attributes required.
8+
The plugin discovers tests by class, method, and function naming conventions — no attributes required.
9+
10+
<plugin-info name="Convention" class="\Testo\Convention\NamingConventionPlugin" />
911

1012
Recognized patterns:
1113

@@ -25,6 +27,21 @@ final class UserServiceTest
2527
function testEmailValidator(): void { /* ... */ }
2628
```
2729

30+
You can customize suffixes and prefixes, and allow or disallow private method discovery:
31+
32+
```php
33+
new SuiteConfig(
34+
// ...
35+
plugins: [
36+
new NamingConventionPlugin(
37+
caseSuffix: 'Test',
38+
testPrefix: 'test',
39+
allowPrivate: false,
40+
),
41+
]
42+
),
43+
```
44+
2845
## When to Use
2946

3047
Use naming conventions when:

0 commit comments

Comments
 (0)