vancodx/php-testing 问题修复 & 功能扩展

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

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

vancodx/php-testing

最新稳定版本:1.7.0

Composer 安装命令:

composer require --dev vancodx/php-testing

包简介

VanCodX PHP Testing

README 文档

README

Installation

Install this package with the following command:

composer require --dev vancodx/php-testing

Create ".phpstan.neon.dist" file in the root directory of your project with the following contents:

includes:
  - vendor/vancodx/php-testing/phpstan-extension/extension.php

parameters:
  level: 10
  paths:
    - src
    - tests

Create "phpunit.xml.dist" file in the root directory of your project with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.4/phpunit.xsd">

  <testsuites>
    <testsuite name="unit">
      <directory>tests/Unit</directory>
    </testsuite>
  </testsuites>

  <source>
    <include>
      <directory suffix=".php">src</directory>
    </include>
  </source>

  <coverage>
    <report>
      <text outputFile="php://stdout" showOnlySummary="true"/>
    </report>
  </coverage>

</phpunit>

Add the following lines into "composer.json" file of your project:

{
  "scripts": {
    "test": [
      "phpstan analyze",
      "phpunit"
    ]
  }
}

Add the following lines into your ".gitignore" file:

.phpstan.neon
.phpunit.result.cache
phpunit.xml

Usage

Use the following command:

composer test

Running tests

Use the following command for running the tests inside a Docker container:

docker compose up --build tests

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-08