← CodeClarityLab Home
Browse by Category
+ added · updated 7d
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
Parameterised / Data-Driven Tests PHP 5.0+
Running the same test logic with multiple input/output pairs — PHPUnit's @dataProvider eliminates copy-pasted test methods for the same behaviour with different values.
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
Visual Regression Testing
Automatically comparing screenshots of UI components or pages to a baseline — catching unintended visual changes that functional tests miss.
2mo ago testing intermediate
Diagram: Acceptance Testing / BDD (Behat) Acceptance Testing / BDD (Behat) PHP 5.0+
Testing that the system meets business requirements from a user perspective — written in plain language (Gherkin) and automated with Behat in PHP.
2mo ago testing intermediate
Diagram: Behaviour-Driven Development (BDD) Behaviour-Driven Development (BDD) PHP 5.0+
A development practice where tests are written in business-readable language (Given/When/Then) that domain experts, developers, and testers all understand.
2mo ago testing intermediate
Diagram: End-to-End Testing End-to-End Testing
Testing complete user flows through a real browser against a running application — verifying that all layers work together from UI to database.
2mo ago testing intermediate
Diagram: Flaky Tests Flaky Tests
Tests that pass and fail non-deterministically on the same code — caused by shared state, timing dependencies, external services, or random data.
2mo ago testing intermediate
Diagram: Integration Testing Integration Testing PHP 5.0+
Tests that verify multiple components work correctly together — often involving real databases, HTTP clients, or third-party services.
2mo ago testing intermediate
Diagram: Load Testing Load Testing PHP 5.0+
Testing system behaviour under expected and peak load conditions to identify performance bottlenecks and breaking points before they affect users.
2mo ago testing intermediate
Diagram: Mocking Best Practices (PHPUnit & Mockery) Mocking Best Practices (PHPUnit & Mockery) PHP 5.0+
Guidelines for effective mocking: mock interfaces not classes, avoid over-mocking, prefer stubs for queries and mocks for commands.
2mo ago testing intermediate
Snapshot Testing PHP 7.0+
A technique that captures the serialised output of a component or function on first run, then compares future runs against that snapshot — detecting unintended changes.
2mo ago testing intermediate
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-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