承接 boggybot/laravel-test-generator 相关项目开发

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

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

boggybot/laravel-test-generator

Composer 安装命令:

composer require boggybot/laravel-test-generator

包简介

Generate laravel tests stubs from registered routes.

README 文档

README

If you have not been writing any tests for your Laravel app, and need a way to scaffold your integration tests, this tool is for you.

How it works?

  1. Generator scans your registered routes
  2. Generates Test for each controller
  3. Generates stubs for each one of your controller actions
  4. You will need to then fill in the stubs with whatever logic your app needs.

Sample Result

<?php

namespace Tests\Amazing\Dashboard\DashboardTest;

use Tests\TestCase;

class DashboardTest extends TestCase
{
    /** @see \App\Http\Controllers\Dashboard\DashboardController::index() */
    public function test_get_dashboard_index()
    {
        //$response = $this->get(route('dashboard.index', []));

        //$response->assertOk();
    }

    ////
}

How to use

composer require --dev boggybot/laravel-test-generator
php artisan generate:tests

App Namespace

By default, any matching registered route in the current project namespace qualifies. eg. App\

You can change which namespace for generator to scan.

php artisan generate:tests --app-namespace="AwesomeApp"

Test Namespace

By default, all tests will be written to 'tests/Acceptance' folder.

php artisan generate:tests --test-namespace="Tests\FeatureTests"

Customize Stubs

php artisan vendor:publish --tag=laravel-test-generator-stubs

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固