proclnas/test-first-skel
一个简单的框架,以测试优先的方式来启动项目
0.1.0
2019-05-19 23:05 UTC
Requires
- php: ^7.2
Requires (Dev)
- phpunit/phpunit: ^8.1
This package is auto-updated.
Last update: 2024-09-20 11:41:01 UTC
README
具有psr-4自动加载和预配置的phpunit/代码覆盖的简单框架
使用此框架创建项目
$ composer create-project -sdev proclnas/test-first-skel project-name
因此,在 project-name 文件夹中,将创建以下结构
- project-name
- src
| ---- Your default namespace, which was generated dinamically with name: ProjectName
- CHANGELOG.md
| ---- Changelog to keep your updates and new features
- composer.json
| ---- A generic composer file with some basic configuration and namespace already configurated
- phpunit.xml
| ---- Phpunit configuration file, code coverage included
- phpcs.xml
| ---- Coding standard configuration, default: PSR-2 standards
- README.md
| ---- Some presentation about your new project :)
预配置的composer命令
- 运行phpunit测试套件
$ composer run-script test
- 使用基于PSR-2标准的phpcs检查错误
$ composer run-script check
- 使用phpcbf修复phpcs发现的问题
$ composer run-script fix
待办事项
- 添加docker-compose以简化应用程序的启动(URL重写等)
许可证
MIT License
Copyright (c) 2019 Rodrigo Nas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.