detect-test-smells
Test Smell Detection
Identifies antipatterns and code smells in PHP test suites.
15 Test Smells
| # | Smell | Severity | Detection Pattern |
|---|---|---|---|
| 1 | Logic in Test | High | if/for/while/foreach in tests |
| 2 | Mock Overuse | High | >3 mocks in single test |
| 3 | Test Interdependence | High | static $, @depends |
| 4 | Fragile Test | High | expects(exactly), at() |
| 5 | Mystery Guest | Medium | file_get_contents, getenv |
| 6 | Eager Test | Medium | Multiple unrelated assertions |
| 7 | Assertion Roulette | Medium | >5 assertions without context |
| 8 | Obscure Test | Low | test_it_works, test_foo |
| 9 | Test Code Duplication | Medium | Repeated setup/assertion |
| 10 | Conditional Test Logic | Medium | if.*assert patterns |
| 11 | Hard-Coded Test Data | Low | Magic values in tests |
More from dykyi-roman/awesome-claude-code
psr-overview-knowledge
PHP Standards Recommendations (PSR) overview knowledge base. Provides comprehensive reference for all accepted PSRs including PSR-1,3,4,6,7,11,12,13,14,15,16,17,18,20. Use for PSR selection decisions and compliance audits.
23detect-code-smells
Detects code smells in PHP codebases. Identifies God Class, Feature Envy, Data Clumps, Long Parameter List, Long Method, Primitive Obsession, Message Chains, Inappropriate Intimacy. Generates actionable reports with refactoring recommendations.
16clean-arch-knowledge
Clean Architecture knowledge base. Provides patterns, antipatterns, and PHP-specific guidelines for Clean Architecture and Hexagonal Architecture audits.
16bug-root-cause-finder
Root cause analysis methods for PHP bugs. Provides 5 Whys technique, fault tree analysis, git bisect guidance, and stack trace parsing.
15ddd-knowledge
DDD architecture knowledge base. Provides patterns, antipatterns, and PHP-specific guidelines for Domain-Driven Design audits.
15testing-knowledge
Testing knowledge base for PHP 8.4 projects. Provides testing pyramid, AAA pattern, naming conventions, isolation principles, DDD testing guidelines, and PHPUnit patterns.
13