Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

php-testing

БесплатноБез исполняемых скриптовНе проверен

Write unit and integration tests for PHP applications with PHPUnit and Pest. Use when writing PHPUnit unit tests or integration tests for PHP applications.

HoangNguyen0403от HoangNguyen0403★ 598 звёзд на GitHub

Об этом скилле

PHP Testing

Priority: P1 (HIGH)

Universal anti-slop rules (identity fixtures, tautologies, skip/focus, mock echoing, bug-first lock, sleeps, shallow assertions, coverage): anti-slop-rules.md. Only PHP deltas follow.

Stack Deltas

  • PHPUnit / Pest: extend TestCase; organize into Unit/, Integration/, Feature/; Pest uses it() and expect().
  • Strict assertions: assertSame (===) over assertEquals to avoid type coercion; also assertCount() and assertMatchesRegularExpression().
  • Data providers ([BE-TEST-01]): #[DataProvider('statusProvider')] (PHPUnit 10+) or dataset (Pest); providers are static methods returning test-case arrays; equivalent inputs only, distinct scenarios may stay separate.
  • Mocking ([BE-TEST-04]): createMock() for boundaries; tests independent and repeatable; DB tests use transactions or SQLite :memory:.
  • Coverage: diagnostic and project-configured; verify risk-weighted critical paths.

Anti-Patterns

  • No private-method tests: test through the public interface only.
  • No over-mocking: mock external boundaries, not internals.
  • No real network or DB in unit tests: use in-memory databases or mocks.
  • No coverage chasing: prioritize meaningful assertions over an arbitrary percentage.

References

Установить php-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evals/evals.jsonreferences/implementation.md

FAQ

Что делает скилл php-testing?

Write unit and integration tests for PHP applications with PHPUnit and Pest. Use when writing PHPUnit unit tests or integration tests for PHP applications.

Как установить скилл php-testing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл php-testing запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить php-testing с