感染/扩展安装程序

Infection 扩展安装程序

资助包维护!
感染
Open Collective

安装次数: 12,926,778

依赖关系: 13

建议者: 0

安全: 0

星标: 23

关注者: 2

分支: 5

开放问题: 2

类型:composer-plugin

0.1.2 2021-10-20 22:08 UTC

This package is auto-updated.

Last update: 2024-08-29 22:52:23 UTC


README

CI Coverage Status

Infection - 扩展安装程序

Composer 插件,用于自动注册 Infection 扩展

如何安装扩展

扩展安装程序与 Infection 核心捆绑在一起。您只需安装一个 composer 包即可注册自定义扩展。

扩展将自动注册。

Infection 扩展安装程序监听 post-install-cmdpost-update-cmd 事件,一旦找到 Infection 扩展,它就会自动将其注册到 Infection 中。

composer require --dev infection/codeception-adapter

Using version 1.0.0 for infection/codeception-adapter
Package operations: 1 installs, 0 updates, 0 removals
  - Installing infection/codeception-adapter (1.0.0): Downloading 100%

infection/extension-installer: Extensions installed
> infection/codeception-adapter: installed

如何为 Infection 编写扩展

Infection 扩展是基于 Composer 的包。基本上,它是一个符合以下要求的 Composer 包

  • 其类型字段设置为 infection-extension
  • 它的 composer.json 中有 extra.infection.class 子键,它引用了一个将在 Infection 运行时调用的类。

示例

{
    "name": "infection/codeception-adapter",
    "type": "infection-extension",
    "extra": {
        "infection": {
            "class": "Infection\\TestFramework\\Codeception\\CodeceptionAdapterFactory"
        }
    }
}

支持的扩展类型

目前,Infection 仅支持测试框架扩展(《示例》)。

可用扩展

所有 Infection 扩展都可以在 Packagist 上找到。

Infection - 演化测试框架

请在此处阅读文档:infection.github.io

Twitter: @infection_php