Repository navigation
Commit af52365
authored
[CodeQuality] Detect Behat context by interface, not class name suffix (#691)
isBehatContext() matched any class whose name ends with 'Context' via
str_ends_with(). That false-positives on production classes like
SchemaValidationContext, rewriting their assert() calls into
\PHPUnit\Framework\Assert:: calls and pulling PHPUnit into non-test code.
Detect a real Behat context by whether it implements
Behat\Behat\Context\Context instead.1 parent 7d86878 commit af52365
0 file changed
0 commit comments