Show the trade-off: "I use Foundry factories for entities needed in many tests — they are concise and handle relationships. For test-specific edge cases, I create entities inline so the test is self-contained and obvious."
Doctrine Fixtures (DoctrineFixturesBundle): PHP classes that create database records, useful for development seeding and test baselines. Factory libraries (Foundry, Alice): generate objects with random but realistic data, support states and relationships. Inline setup: create entities directly in test methods for maximum clarity. Best practice: use factories for common entities needed across many tests, inline creation for test-specific data, and fixtures for development environment seeding. Strong candidates discuss: test database isolation (transaction rollback or separate database), fixture ordering with getDependencies(), and the trade-off between shared fixtures (fast but coupled) and per-test setup (slow but independent).
Tests testing maturity. Candidates with no strategy for test data will write slow, brittle, or coupled tests. Those who use factories for common data and inline creation for specific cases balance speed with clarity.