← 返回命令列表

Linux command

atoum 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run

atoum -f [tests/units/MyTest.php]

Example

atoum -d [tests/units]

Example

atoum -d [tests/] -c

Example

atoum -d [tests/] --coverage-html [coverage/]

Example

atoum -d [tests/] --debug

说明

atoum is a modern PHP unit testing framework emphasizing simplicity and clarity. It provides an intuitive API for writing tests with minimal boilerplate, featuring mocking, code coverage, and parallel execution. The framework uses a natural, fluent assertion syntax and includes tools for test isolation and dependency injection.

参数

-f _file_
Run specific test file
-d _directory_
Run all tests in directory
-c, --coverage
Generate code coverage
--coverage-html _dir_
HTML coverage report
--coverage-xml _file_
XML coverage report
--debug
Debug mode
-l, --loop
Run tests in continuous mode
-p _n_, --max-children-number _n_
Parallel test execution
--fail-if-void-methods
Fail if test methods are empty

FAQ

What is the atoum command used for?

atoum is a modern PHP unit testing framework emphasizing simplicity and clarity. It provides an intuitive API for writing tests with minimal boilerplate, featuring mocking, code coverage, and parallel execution. The framework uses a natural, fluent assertion syntax and includes tools for test isolation and dependency injection.

How do I run a basic atoum example?

Run `atoum -f [tests/units/MyTest.php]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f _file_ do in atoum?

Run specific test file