定制 dotcubed.io/laravel-testing-prep 二次开发

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

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

dotcubed.io/laravel-testing-prep

Composer 安装命令:

composer require dotcubed.io/laravel-testing-prep

包简介

Testing Prep

README 文档

README

What is this repository for?

This repo hooks an Artisan command that duplicates a project's database to a testing one so that automated tests can be run against it.

How do I get set up?

You will need the following already in place:

  • a .env file with a working and connectable database
  • a .env.testing file pointing to the testing database
  • a mysql_testing configuration block in /config/database.php

Running the Artisan

To run the Artisan use the following terminal command:

php artisan testing-prep

Behind the scenes

The following happens when running the command:

  • .env and .env.testing files are checked
  • mysql_testing configuration block is checked
  • a schema:dump is run against the .env database
  • the .env.testing database is dropped, if it exists
  • the .env.testing database is created and loaded with the schema:dump output
  • Seeders are run against the .env.testing database (default: /database/seeders/DatabaseSeeder.php)

Configuration

To publish the configuration (optional) to the /config/testing-prep.php file run the following terminal command:

php artisan vendor:publish --tag=testing-prep

The following configurable options are available:

optiontypedefaultdescription
schema.database_connectionstringmysqlthe current project's database connection name
schema.test_database_connectionstringmysql_testing)the test database connection name to be used
seedersarray[DatabaseSeeder]a list of seeders inside /database/seeders that will be run after the testing DB is created and migrated

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固