struggle-for-php/sfp-infection-mutator

0.0.3 2019-08-18 13:19 UTC

This package is auto-updated.

Last update: 2024-09-15 15:43:19 UTC


README

感染变异器 PHP变异测试框架

变异器

PregMatchIsNumeric

  • 将 "preg_match('/\A[0-9]+\z/', '-0.12');" 替换为 "is_numeric('-0.12');"

UnwrapStrReplace

安装

composer require --dev struggle-for-php/sfp-infection-mutator

在您的 infection.json 中设置

{
    "mutators": {
        "@default": true,
        "Sfp\\Infection\\Mutator\\Regex\\PregMatchIsNumeric": {},
        "Sfp\\Infection\\Mutator\\Unwrap\\UnwrapStrReplace": {}
    }
}