定制 domlip94/laravel-test-generator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

domlip94/laravel-test-generator

Composer 安装命令:

composer require domlip94/laravel-test-generator

包简介

Laravel package for generating unit test automatically

README 文档

README

Auto generate the unit test file for the available routes

Installation

The package can easily be installed by running composer require vigneshc91/laravel-test-generator in your project's root folder.

If you are running a version of Laravel < 5.5 also make sure you add Vigneshc91\LaravelTestGenerator\TestGeneratorServiceProvider::class to the providers array in config/app.php.

This will register the artisan command that will be available to you.

Usage

Generating the test file is easy, simply run php artisan laravel-test:generate in your project root. This will write all the test cases into the file based on controller.

If you wish to filter for specific routes only, you can pass a filter attribute using --filter, for example php artisan laravel-test:generate --filter='/api'

If you wish to change the directory of creating the test file, you can pass a directory using --dir, for example php artisan laravel-test:generate --dir='V1'

If you wish to add the @depends attribute to all the function except the first function for running test cases synchronously, you can pass a sync attribute using --sync, for example php artisan laravel-test:generate --sync='true'

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-26