skill-php-testing

Orchestrate PHP unit, integration, and feature tests with PHPUnit.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/claudioborja/biblioteca --skill skill-php-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skill-php-testing
Source: https://github.com/claudioborja/biblioteca/tree/main/.agents/skills/skill-php-testing
Command: npx skills add https://github.com/claudioborja/biblioteca --skill skill-php-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developing tests for pure PHP projects without frameworks can be slow and brittle. This Skill provides a fast, framework-free testing workflow using PHPUnit, in-memory repositories, builders, and test doubles to organize and run unit, integration, and feature tests.

Core Features & Use Cases

  • Framework-free testing: run fast unit tests without a PHP framework.
  • In-memory repositories: simulate data stores for deterministic tests.
  • Layered test suites: Unit, Integration, and Feature tests with builders and fixtures.
  • Test doubles and mocks: verify interactions using stubs, mocks, and spies with PHPUnit.
  • TDD guidance: support red-green-refactor cycles and clear naming conventions.

Quick Start

Install dependencies with composer and run the PHPUnit suite to start validating tests.

Frequently Asked Questions about skill-php-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run PHP unit tests without a framework?

You can run PHP unit tests without a framework by using PHPUnit with in-memory repositories and test doubles. This approach provides fast feedback loops and deterministic results by simulating data stores directly in memory.

What is the best way to organize PHP integration and feature tests?

The best way to organize PHP integration and feature tests is by separating them into layered suites. Using builders, seeds, and fixtures ensures you generate realistic test data for robust coverage across the testing workflow.

How do in-memory repositories work for PHP testing?

In-memory repositories work for PHP testing by simulating data stores to provide deterministic test environments. They replace actual database interactions, allowing fast framework-free unit and integration tests without external dependencies.

Can I use PHPUnit mocks and stubs for pure PHP projects?

Yes, you can use PHPUnit mocks, stubs, and spies for pure PHP projects. This workflow verifies interactions and isolates components using test doubles, ensuring fast feedback loops without requiring a full PHP framework.

Does framework-free PHP testing support TDD red-green-refactor cycles?

Yes, framework-free PHP testing supports TDD red-green-refactor cycles. The workflow provides clear naming conventions and structured unit, integration, and feature test layers to guide test-driven development processes effectively.

Why use builders and fixtures in PHP integration tests?

Builders and fixtures are used in PHP integration tests to generate realistic and structured test data. They ensure deterministic test execution and robust coverage by providing controlled, repeatable data states across the test suite.