testo/filter
Composer 安装命令:
composer require testo/filter
包简介
Test filtering plugin for the Testo testing framework.
README 文档
README
Test filtering plugin
Important
🪞 This is a read-only mirror.
Active development of the Testo project lives in php-testo/testo under plugin/filter/. This repository is automatically synchronized from there on every release.
File issues and pull requests in the main monorepo, not here.
About
Selects which tests run on a given invocation by name patterns, paths, suites, types, dataset pointers, and groups. Powers Testo's --filter, --path, --suite, --type, and --group CLI flags.
Groups
Label tests with the #[Group] attribute and select them with --group:
use Testo\Filter\Group; use Testo\Test; #[Test] #[Group('integration')] // every test of this class inherits "integration" final class OrderTest { #[Group('slow')] // groups: integration, slow public function importsLargeDataset(): void { /* ... */ } public function createsOrder(): void { /* ... */ } // groups: integration }
The attribute targets classes, methods, and functions and accepts several names at once
(#[Group('db', 'slow')]). A test's group set is the union of all groups reachable from it:
its own method (and any overridden parent method), the test class, its parent classes, and traits.
# Run only tests in the "db" or "integration" group (OR logic) ./vendor/bin/testo run --group=db --group=integration # Exclude a group with the "!" prefix (run everything except "slow") ./vendor/bin/testo run --group=!slow # Combine with other filters (AND between filter types) ./vendor/bin/testo run --group=db --filter=OrderTest
Exclusion (!) takes precedence over inclusion. Group filters combine with name/path/suite/type
filters using AND logic.
Install
composer require --dev testo/filter
统计信息
- 总下载量: 2.46k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2026-05-02