laravel-testing
БесплатноБез исполняемых скриптовНе проверенWrite Pest feature tests with RefreshDatabase, mock external services, and create test data with Eloquent Factories in Laravel. Use when adding HTTP tests…
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
Laravel 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 Laravel deltas follow.
Stack Deltas
- Pest feature tests:
uses(RefreshDatabase::class)at the top of the file. Example:it('creates a post', fn() => $this->postJson('/api/posts', [...])); the database rolled back after each test. - Transactions:
DatabaseTransactionsfor faster but non-truncating isolation. - Service mocking (
[BE-TEST-04]):$this->mock(PaymentService::class)withshouldReceive('charge')->once()->with(100); use$this->spy()for loose verification; never make real network calls. - Factories & DB (
[BE-TEST-02]): create data viaPost::factory()->count(3)->create(['user_id' => $id]). Inphpunit.xml, set<env name='DB_CONNECTION' value='sqlite'/>and<env name='DB_DATABASE' value=':memory:'/>. - HTTP assertions (
[BE-TEST-03]): chainassertStatus(201),assertJson(['data' => ...]),assertJsonStructure, andassertHeader; never assert status alone. - Coverage: diagnostic and project-configured; verify risk-weighted critical paths.
Anti-Patterns
- No real network calls: always mock or stub external services.
- No state leakage between tests: use
RefreshDatabase. - No raw inserts: never DB::table()->insert() test data; use Eloquent Factories.
Установить laravel-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл laravel-testing?
Write Pest feature tests with RefreshDatabase, mock external services, and create test data with Eloquent Factories in Laravel. Use when adding HTTP tests, configuring SQLite in-memory test database, or mocking payment services.
Как установить скилл laravel-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл laravel-testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic