diff --git a/src/TextUI/Command.php b/src/TextUI/Command.php index 967f2196095..29481384aa9 100644 --- a/src/TextUI/Command.php +++ b/src/TextUI/Command.php @@ -781,7 +781,8 @@ protected function handleArguments(array $argv): void if (isset($this->options[1][0]) && \substr($this->options[1][0], -5, 5) !== '.phpt' && - \substr($this->options[1][0], -4, 4) !== '.php' + \substr($this->options[1][0], -4, 4) !== '.php' && + \substr($this->options[1][0], -1, 1) !== '/' ) { print 'Warning: Calling PHPUnit with a class name is deprecated and will be removed in PHPUnit 9.' . \PHP_EOL; } diff --git a/tests/end-to-end/abstract-test-class.phpt b/tests/end-to-end/abstract-test-class.phpt index 4d65da591f3..c724b8f7836 100644 --- a/tests/end-to-end/abstract-test-class.phpt +++ b/tests/end-to-end/abstract-test-class.phpt @@ -3,11 +3,13 @@ phpunit ../../_files/AbstractTest.php --FILE-- --EXPECTF-- +Warning: Calling PHPUnit with a class name is deprecated and will be removed in PHPUnit 9. Class 'Issue3904' could not be found in '%s'.