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. ── THE JUDGE OF AN OPERATION HOLDS WHAT THE OPERATION WORKS THROUGH (greenhouse evidence/1156) ──── The house says the judge comes before the body. Three real residents out of three, with their operations scaffolded, spent their next fourteen to seventeen calls to the model finding out one thing the house knew: how a test gets the repository `run()` receives. One never found it and filled no body. So when the class judged is an operation of the plugin, the scaffold already builds that repository —in memory— and shows the call the house makes. It still fails on purpose: what it must DO is the one thing no scaffold knows. 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 |