TestGenerator
Scaffold the behavioral judge of a class: `tests/Plugins/<Plugin>/<Class>Test.php`. ── WHY THE SCAFFOLD FAILS ON PURPOSE ──────────────────────────────────────────────────────────── The landing gate runs this judge whenever its subject lands (`implement`/`edit`). A scaffold that passed vacuously — an empty method, a `markTestIncomplete` — would GREEN-LIGHT every body the moment the file exists: a judge that judges nothing, wearing a verdict. So the scaffold's one test is `self::fail(...)` with instructions: until somebody declares what the class must DO, no body lands past it. The red is not a defect — it is TDD's starting position, made unskippable. The judge itself lands through the SAME gate (implement reaches `tests/Plugins/`), and the gate knows a judge never judges itself — otherwise this red would be unlandable. A name that already ends in `Test` IS the judge. Appending the suffix again invents a class the landing gate cannot find (`TareaServiceTest` → `TareaServiceTestTest`) and the guidance used to teach the resulting cycle: fill that phantom, then land a body that does not exist.
TestGenerator::name()
public function name(): stringThe `<what>` token this generator answers to: `'test'`.
TestGenerator::generate()
public function generate(Milpa\DevTools\Make\GenerationContext $context): Milpa\DevTools\Make\GenerationResultRenders the judge scaffold and points the next step at the REAL target — never a cycle.
Parameters
| Name | Type | Description |
|---|---|---|
| $context | Milpa\DevTools\Make\GenerationContext |