Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

lint/phpunit/prefer-namespaced

In the code-quality set. Unsafe fix: it can change behaviour. Runs when phpunit is installed.

What it does

PHPUnit classes MUST be used in namespaced version, e.g. \PHPUnit\Framework\TestCase instead of \PHPUnit_Framework_TestCase.

Configuration

[lint.rules]
"phpunit/prefer-namespaced" = "error"

To skip it in some files, add an override or a @pun-ignore-file comment.

Options

Name Type Allowed values Default Upstream name
target enum 4.8, 5.7, 6.0, newest "newest" target

Replaces

More lint/phpunit rules · Edit this page

Last updated on

Was this page helpful?