en un clic
testo-inline-tests
Attach
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Attach
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Migrate an existing PHPUnit (or Pest) test suite to Testo — via the Rector bridge, via AI-agent rewriting, or a combination. Use when the user says "migrate from PHPUnit", "port phpunit tests", "convert TestCase to Testo", or has files extending PHPUnit\Framework\TestCase that need to move to Testo's attribute-based style.
Set up or edit `testo.php` — the Testo application config. Use when the user is bootstrapping a project (including running `vendor/bin/testo init`), adding/removing a suite, scoping a finder, wiring an application-wide plugin (coverage, JUnit), or asking "where do I configure Testo" / "how do I initialize Testo".
Report and raise line coverage on a Testo project — collect coverage once, aggregate the Clover report into a ranked, LLM-friendly work-list, then optionally write tests for the least-covered files with subagents. Use both for read-only coverage questions and for improving coverage. Triggers are "increase coverage", "improve test coverage", "cover untested code", "find uncovered lines", "raise the coverage percentage", "what isn't tested", "what's our test coverage", "coverage status/report", "how well tested is X", "is X covered".
Write or modify tests in a project that uses the Testo PHP testing framework. Use when adding a
Author a Testo plugin — interceptors (middleware), event listeners, container bindings, custom attributes, or full test-environment provisioning. Use when the user wants to extend how Testo runs tests (wrap every test, provision a database/service, custom reporters, attribute-driven behaviour, integrating an external system) rather than writing a single test.
Write or tune Testo performance benchmarks with
| name | testo-inline-tests |
| description | Attach |
#[TestInline])#[TestInline] lets you attach example inputs and an expected return value directly to a method
in production code. The Testo runner discovers and executes them like normal tests, but they live
next to the implementation — handy for pure functions and library primitives.
This requires the InlineTestPlugin to be enabled for the suite that scans the relevant directory.
Fetch https://php-testo.github.io/llms.txt for the attribute signature and llms-full.txt for the
plugin wiring details — verify them before generating code, the API surface is small but specific.
<?php
declare(strict_types=1);
namespace App\Math;
use Testo\Inline\TestInline;
final class Vector
{
#[TestInline([1, 2], 3)]
#[TestInline([5, 10], 15)]
#[TestInline([-1, 1], 0)]
public static function sum(int $a, int $b): int
{
return $a + $b;
}
}
#[TestInline] attribute = one case.Use #[TestInline] when all of the following hold:
Otherwise prefer a regular #[Test] class — testo-write-tests skill.
#[TestInline] cannot use #[BeforeTest] hooks.Expect::exception(...) inside a regular test.For inline tests to run, the suite scanning the production directory must include InlineTestPlugin.
Excerpt from testo.php:
use Testo\Application\Config\Plugin\SuitePlugins;
use Testo\Inline\InlineTestPlugin;
new SuiteConfig(
name: 'Sources',
location: ['src'],
plugins: SuitePlugins::only(new InlineTestPlugin()),
),
If the user adds #[TestInline] but the test never runs, check the suite plugin list first.
#[TestInline] on methods that touch globals, the filesystem, time, or randomness.#[TestInline] reports the method's FQN + the attribute index as the test identifier. Order matters for diff readability.