testo/filter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

testo/filter

Composer 安装命令:

composer require testo/filter

包简介

Test filtering plugin for the Testo testing framework.

README 文档

README

TESTO

Test filtering plugin

Documentation Support on Boosty


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

PHP Latest Version on Packagist License Total Downloads

统计信息

  • 总下载量: 2.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-05-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固