Skip to content
Paolo T. edited this page Nov 14, 2013 · 3 revisions

wp-cli devtools User Manual

Command: phpcs

PHP Code Sniffer wrapper. Detects violations of a defined set of coding standards.

SYNOPSIS

wp phpcs run --files=<files>

OPTIONS

--files=<files>
  Comma-separated files or paths to check

Command: phpmd

PHP Mess Detector wrapper. Analyze source code for several potential problems.

SYNOPSIS

wp phpmd run <folder>

OPTIONS

<folder>
  Folder to check

Command: phpunit

PHPunit wrapper. Run PHPunit unit tests.

SYNOPSIS

wp phpunit run [--core] [--plugin=<plugin>] [--tests-folder=<tests>]

OPTIONS

--core
  Run WordPress core unit tests
--plugin=<plugin>
  Run selected plugin unit tests
--tests-folder=<tests>
  Optional WordPress unit tests folder

#### EXAMPLES

wp phpunit run --core
wp phpunit run --plugin=plugin-slug
wp phpunit run --core --unit_tests=/home/user/src/wp-unit-tests/