承接 twistersfury/codeception-coverage 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

twistersfury/codeception-coverage

Composer 安装命令:

composer require twistersfury/codeception-coverage

包简介

Utility Project To Ensure All Classes Have An Equivalent Test File

README 文档

README

This module will verify that there is a 1-to-1 relationship between the application files and the unit tests.

Usage

Installation

composer require twistersfury/codception-coverage

Initial Setup

The susgested setup is to create a custom suite called coverages and add the test file there. Otherwise, you can put it into the Unit Suite instead. If you've never used a custom suite, you can look at this package's tests folder as an example setup. The key files are coverage.suite.dist.yml and _support/CoverageTester.php in addition to the coverage folder/test.

Create a single file in your unit suite or custom suite with the below contents:

<?php

use TwistersFury\Codeception\Coverage\FileCoverageTest;

class CoverageTest extends FileCoverageTest
{
    // Empty Body
}

Configuration

The below example represents the default configuration and can otherwise be omitted for most projects.

modules:
  config:
    \TwistersFury\Codeception\Coverage\Module:
      sourcePath: 'src' # The path to the source files to be scanned.
      testPath: 'tests/unit' # The path to the unit tests to check.

      ###################################################################################################
      # The extension to check for. It will automatically skip any files that do not have this extension.
      #   This module was originally developed for a Zephir based project, which uses the extension .zep.
      extension: 'php'

      ###################################################################################################
      # Patterns listed in `ignores` will be excluded from the testing. This allows you to define what
      #   items get scanned, and what items do not. This is a str_contains match (not regex). Note that
      #   if you change `extension` above, you'll likely be needing to change `ignores` below.
      ignores:
        - '/etc'
        - 'phalcon_bootstrap.php'
        - '/Interfaces/'
        - 'Interface.php'
        - 'Controller.php'

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固