← CodeClarityLab Home
Browse by Category
+ added · updated 7d
✕ Clear A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Test Doubles PHP 8.0+
Substitute objects used in tests to replace real dependencies — mocks, stubs, spies, fakes, and dummies each serve a different purpose.
1mo ago testing intermediate
Test-Driven Development (TDD) PHP 7.0+
A development practice where tests are written before the code they test — Red (write a failing test), Green (write the minimum code to pass), Refactor (improve without breaking tests).
2mo ago testing intermediate
Test Coverage Types PHP 7.0+
Line coverage (lines executed), branch coverage (if/else paths), mutation testing (do tests detect actual bugs) — each measures a different aspect of test quality.
2mo ago testing intermediate
Test Environment Parity
Dev, staging, and production must use identical PHP versions, MySQL versions, and OS configurations — divergence causes bugs that only appear in production.
2mo ago testing intermediate
Test Naming Conventions
Well-named tests read as specifications — they document what the system does, make failure messages self-explanatory, and allow filtering tests by feature or scenario.
2mo ago testing beginner
Test Data Builders PHP 7.0+
A pattern for constructing test objects with sensible defaults that can be selectively overridden — reducing test setup noise and making the relevant data explicit.
2mo ago testing intermediate
Test Fixtures & setUp() Best Practices
Managing test state with setUp()/tearDown(), object mothers, and factories — keeping tests isolated, readable, and fast.
2mo ago testing intermediate
Test Isolation Strategies PHP 7.0+
Ensuring each test starts from a known clean state — using database transactions, in-memory fakes, or container resets so tests don't bleed state into each other.
2mo ago testing intermediate
Diagram: Test Pyramid Test Pyramid PHP 5.0+
A model advocating many fast unit tests at the base, fewer integration tests in the middle, and a small number of slow E2E tests at the top.
2mo ago testing beginner
Diagram: Test-Driven Development (TDD) Test-Driven Development (TDD) PHP 5.0+
A development practice where tests are written before production code, driving design through the Red-Green-Refactor cycle.
2mo ago testing intermediate
✓ schema.org compliant