Skip to content

Commit c32af9a

Browse files
committed
Update CLAUDE.md to reflect grouped attribute arrays in TestoClasses
Matches refactor from 75a5fcc: attributes are now organized into TEST_ATTRIBUTES, TEST_INLINE_ATTRIBUTES, DATA_ATTRIBUTES, BENCH_ATTRIBUTES arrays and spread across the codebase instead of being duplicated. https://claude.ai/code/session_01TmFvjfMtoxTvddQRBzsbPN
1 parent 81b91a2 commit c32af9a

1 file changed

Lines changed: 17 additions & 18 deletions

File tree

CLAUDE.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -137,28 +137,27 @@ The plugin registers extensions in `plugin.xml` under two namespaces:
137137
- `com.intellij.modules.platform` — IntelliJ Platform core
138138
- `com.jetbrains.php` — PHP language support (makes this plugin work in PhpStorm / IDEA Ultimate with PHP plugin)
139139

140-
### Testo PHP Framework — Supported Classes
141-
142-
The plugin recognizes these PHP namespaces/attributes (defined in `TestoClasses.kt`):
143-
144-
| Category | Old namespace (`\Testo\Sample\*`, `\Testo\Attribute\*`) | New namespace (`\Testo\Application\*`, `\Testo\Data\*`, etc.) |
145-
|-----------------|----------------------------------------------------------|---------------------------------------------------------------|
146-
| Test attribute | `\Testo\Attribute\Test` | `\Testo\Application\Attribute\Test` |
147-
| Inline test | `\Testo\Sample\TestInline` | `\Testo\Inline\TestInline` |
148-
| Data provider | `\Testo\Sample\DataProvider` | `\Testo\Data\DataProvider` |
149-
| Data set | `\Testo\Sample\DataSet` | `\Testo\Data\DataSet` |
150-
| Data union || `\Testo\Data\DataUnion` |
151-
| Data cross || `\Testo\Data\DataCross` |
152-
| Data zip || `\Testo\Data\DataZip` |
153-
| Benchmark || `\Testo\Bench\BenchWith` |
154-
| Assertions || `\Testo\Assert`, `\Testo\Expect` |
140+
### Testo PHP Framework — Supported Attributes
141+
142+
The plugin recognizes PHP attributes defined in `TestoClasses.kt`. Constants are grouped into arrays for reuse across the codebase:
143+
144+
| Group (array) | Attributes (FQN) |
145+
|------------------------|-------------------------------------------------------------------------------------------------------|
146+
| `TEST_ATTRIBUTES` | `\Testo\Attribute\Test` (new), `\Testo\Application\Attribute\Test` (old) |
147+
| `TEST_INLINE_ATTRIBUTES` | `\Testo\Sample\TestInline` (old), `\Testo\Inline\TestInline` (new) |
148+
| `DATA_ATTRIBUTES` | `\Testo\Sample\DataProvider`, `\Testo\Data\DataProvider`, `\Testo\Sample\DataSet`, `\Testo\Data\DataSet`, `\Testo\Data\DataUnion`, `\Testo\Data\DataCross`, `\Testo\Data\DataZip` |
149+
| `BENCH_ATTRIBUTES` | `\Testo\Bench\BenchWith` |
150+
151+
Other constants: `ASSERT` (`\Testo\Assert`), `EXPECT` (`\Testo\Expect`), `ASSERTION_EXCEPTION`.
152+
153+
These arrays are spread into `RUNNABLE_ATTRIBUTES` (line markers) and `MEANINGFUL_ATTRIBUTES` (PsiUtil) — adding a new attribute to the group array automatically propagates it everywhere.
155154

156155
### Test Detection Logic (mixin.kt)
157156

158157
A PHP element is recognized as a Testo test when:
159-
- **Method:** public + name starts with `test`, OR has `#[Test]` / `#[TestInline]` attribute
160-
- **Function:** has `#[Test]` / `#[TestInline]` attribute (standalone test functions)
161-
- **Benchmark:** has `#[BenchWith]` attribute
158+
- **Method:** public + name starts with `test`, OR has any `TEST_ATTRIBUTES` / `TEST_INLINE_ATTRIBUTES`
159+
- **Function:** has any `TEST_ATTRIBUTES` / `TEST_INLINE_ATTRIBUTES` (standalone test functions)
160+
- **Benchmark:** has any `BENCH_ATTRIBUTES`
162161
- **Class:** name ends with `Test` or `TestBase`, OR contains test/bench methods
163162
- **File:** filename matches test class pattern, OR contains test classes/functions/benchmarks
164163

0 commit comments

Comments
 (0)